Skip to content

Commit 8ea0e65

Browse files
committed
Adding utility scripts.
1 parent 04f9f6b commit 8ea0e65

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See all tag variants at https://hub.docker.com/r/tensorflow/tensorflow/tags/
2+
# build with `ln -sf Dockerfile.gpu Dockerfile && docker build --network=host -t {container-name} .`
3+
# NOTE(jwd) - if you wish to use this implementation, you must install nvidia-docker v2.0
4+
# see https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0) for steps
5+
FROM tensorflow/tensorflow:latest-gpu-py3-jupyter
6+
7+
## modify below
8+
ARG username=gdl
9+
ARG groupid=1000
10+
ARG userid=1000
11+
## end modify
12+
13+
RUN apt-get update && apt-get install -y \
14+
graphviz \
15+
libgraphviz-dev \
16+
git
17+
18+
COPY ./requirements.txt /
19+
RUN python3 -m pip install --upgrade pip
20+
RUN pip install -r /requirements.txt
21+
22+
# -m option creates a fake writable home folder for Jupyter.
23+
RUN groupadd -g $groupid $username \
24+
&& useradd -m -r -u $userid -g $username $username
25+
USER $username
26+
27+
VOLUME ["/GDL"]
28+
WORKDIR /GDL
29+
30+
CMD ["jupyter", "notebook", "--no-browser", "--ip=0.0.0.0", "/GDL"]

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build --network=host -t gdl-image-gpu .

run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
./launch-docker-gpu.sh ~/develop/GDL_code
2+

0 commit comments

Comments
 (0)