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
# SYSTEM INITIALIZATION
# RUN pip install jupyter
USER ${USER}
# USER INITIALIZATION
# RUN ...
SHELL ["/bin/bash", "--login", "-i", "-c"]
WORKDIR /wd

@ -1,6 +1,7 @@
#!/bin/bash
CURDIRNAME=${PWD##*/}
docker build . -t ${USER}_${IMAGE_NAME} \
docker build . -t ${USER}_${CURDIRNAME} \
--build-arg USER=${USER} \
--build-arg GROUP=${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
./start_daemon.sh или ./start_interactively.sh
```

@ -1,3 +1,4 @@
#!/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
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