Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker image, Makefile and requirements.txt #7

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__pycache__
cache
.vscode
results
17 changes: 17 additions & 0 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# First install the CUDA 9.2 Docker Image
FROM tensorflow/tensorflow:latest-gpu-py3
LABEL Author="Or Fleisher <https://orfleisher.com>"
LABEL Title="Stylegan Dockerfile"

WORKDIR /
ENV PATH="/root/.local/bin:${PATH}"

RUN apt-get -yqq update && \
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \
apt-get autoremove -y && \
apt-get clean -y

COPY requirements.txt .

# Install the python dependencies
RUN pip3 install --user -r requirements.txt
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dockerfile := "Dockerfile.gpu"
tag_name := "juniorxsound/stylegan:latest"

build:
docker build -f ./$(dockerfile) -t $(tag_name) ./

shell:
docker run --gpus all -w /data --rm -it -v `pwd`:/data -t $(tag_name) /bin/bash

example:
docker run --gpus all -w /data --rm -it -v `pwd`:/data -t $(tag_name) python3 pretrained_example.py

jupyter:
docker run --gpus all -p 8888:8888 -w /data --rm -it -v `pwd`:/data -t $(tag_name) jupyter notebook ./notebooks --ip=0.0.0.0 --allow-root \
Empty file added notebooks/.gitkeep
Empty file.
79 changes: 79 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
absl-py==0.8.0
asn1crypto==0.24.0
astor==0.8.0
attrs==19.1.0
backcall==0.1.0
bleach==3.1.0
certifi==2019.9.11
chardet==3.0.4
cryptography==2.1.4
cycler==0.10.0
decorator==4.4.0
defusedxml==0.6.0
entrypoints==0.3
gast==0.3.2
google-pasta==0.1.7
grpcio==1.23.0
h5py==2.10.0
idna==2.8
ipykernel==5.1.2
ipython==7.8.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.15.1
Jinja2==2.10.1
jsonschema==3.0.2
jupyter==1.0.0
jupyter-client==5.3.3
jupyter-console==6.0.0
jupyter-core==4.5.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keyring==10.6.0
keyrings.alt==3.0
kiwisolver==1.1.0
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.1.1
mistune==0.8.4
nbconvert==5.6.0
nbformat==4.4.0
notebook==6.0.1
numpy==1.16.1
pandocfilters==1.4.2
parso==0.5.1
pexpect==4.7.0
pickleshare==0.7.5
Pillow==5.4.1
prometheus-client==0.7.1
prompt-toolkit==2.0.9
protobuf==3.9.2
ptyprocess==0.6.0
pycrypto==2.6.1
Pygments==2.4.2
pygobject==3.26.1
pyparsing==2.4.2
pyrsistent==0.15.4
python-apt==1.6.4
python-dateutil==2.8.0
pyxdg==0.25
pyzmq==18.1.0
qtconsole==4.5.5
requests==2.21.0
SecretStorage==2.3.1
Send2Trash==1.5.0
six==1.12.0
tensorboard==1.14.0
tensorflow-estimator==1.14.0
tensorflow-gpu==1.14.0
termcolor==1.1.0
terminado==0.8.2
testpath==0.4.2
tornado==6.0.3
traitlets==4.3.2
urllib3==1.24.3
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.16.0
widgetsnbextension==3.5.1
wrapt==1.11.2