|
|
@ -1,13 +1,15 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
CURDIRNAME=${PWD##*/}
|
|
|
|
CURDIRNAME=${PWD##*/}
|
|
|
|
|
|
|
|
|
|
|
|
PORT=8400
|
|
|
|
VSCODE_PORT=8400
|
|
|
|
|
|
|
|
YOURAPP_INSIDE_DOCKER_PORT=24000
|
|
|
|
PASSWORD=$(openssl rand -base64 45)
|
|
|
|
PASSWORD=$(openssl rand -base64 45)
|
|
|
|
docker run \
|
|
|
|
docker run \
|
|
|
|
-d \
|
|
|
|
-d \
|
|
|
|
--rm \
|
|
|
|
--rm \
|
|
|
|
--gpus "device=0" \
|
|
|
|
--gpus "device=0" \
|
|
|
|
-p $PORT:8443 \
|
|
|
|
-p ${VSCODE_PORT}:8443 \
|
|
|
|
|
|
|
|
-p ${YOURAPP_INSIDE_DOCKER_PORT}:443 \
|
|
|
|
-v $(pwd):/wd \
|
|
|
|
-v $(pwd):/wd \
|
|
|
|
--shm-size=10gb \
|
|
|
|
--shm-size=10gb \
|
|
|
|
--name ${USER}_${CURDIRNAME}_vscode \
|
|
|
|
--name ${USER}_${CURDIRNAME}_vscode \
|
|
|
@ -18,4 +20,4 @@ sleep 1
|
|
|
|
docker logs ${USER}_${CURDIRNAME}_vscode
|
|
|
|
docker logs ${USER}_${CURDIRNAME}_vscode
|
|
|
|
echo ""
|
|
|
|
echo ""
|
|
|
|
echo "Address: https://$(hostname -i | awk '{ print $1; }'):${PORT}"
|
|
|
|
echo "Address: https://$(hostname -i | awk '{ print $1; }'):${PORT}"
|
|
|
|
echo "Password: $PASSWORD"
|
|
|
|
echo "Password: $PASSWORD"
|