Fixed IMAGE_NAME variable

master
Vladimir Protsenko 2 years ago
parent 84e5503a7c
commit 76e03861bc

@ -11,10 +11,12 @@ RUN mkdir /wd
RUN chown ${USER}:${GROUP} /wd RUN chown ${USER}:${GROUP} /wd
# SYSTEM INITIALIZATION # SYSTEM INITIALIZATION
# RUN pip install jupyter
USER ${USER} USER ${USER}
# USER INITIALIZATION # USER INITIALIZATION
# RUN ...
SHELL ["/bin/bash", "--login", "-i", "-c"] SHELL ["/bin/bash", "--login", "-i", "-c"]
WORKDIR /wd WORKDIR /wd

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
CURDIRNAME=${PWD##*/}
docker build . -t ${USER}_${IMAGE_NAME} \ docker build . -t ${USER}_${CURDIRNAME} \
--build-arg USER=${USER} \ --build-arg USER=${USER} \
--build-arg GROUP=${USER} \ --build-arg GROUP=${USER} \
--build-arg UID=$(id -u ${USER}) \ --build-arg UID=$(id -u ${USER}) \

@ -1,6 +1,8 @@
Как использовать: Как использовать:
``` ```
git clone https://git.ai.ssau.ru/liav/docker_template myproject
cd myproject
./build.sh ./build.sh
./start_daemon.sh или ./start_interactively.sh ./start_daemon.sh или ./start_interactively.sh
``` ```

@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
CURDIRNAME=${PWD##*/}
docker run --name ${USER}_${IMAGE_NAME} -d --gpus all -p 8900:8888 -v /home/${USER}:/wd ${USER}_${IMAGE_NAME} docker run --name ${USER}_${CURDIRNAME} -d --gpus all -p 8900:8888 -v /home/${USER}:/wd ${USER}_${CURDIRNAME}

@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
CURDIRNAME=${PWD##*/}
docker run -it --rm --gpus "device=0" -p 8900:8888 -v /home/${USER}:/wd ${USER}_${IMAGE_NAME} docker run -it --rm --gpus "device=0" -p 8900:8888 -v /home/${USER}:/wd ${USER}_${CURDIRNAME}

Loading…
Cancel
Save