diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3099ac2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +* +!requirements.txt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..11e4004 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM jupyter/tensorflow-notebook + +MAINTAINER Denley Hsiao + +ARG APP_DIR=/app/ +USER root + +RUN mkdir -p $APP_DIR +COPY requirements.txt $APP_DIR +WORKDIR $APP_DIR +USER jovyan + +RUN pip install -r requirements.txt + +EXPOSE 8888 \ No newline at end of file diff --git a/README.md b/README.md index bf6f9fa..d42e670 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ 14. [DeepDream](https://zhuanlan.zhihu.com/p/27546601) ([Notebook](https://github.com/thrillerist/TensorFlow-Tutorials/blob/master/14_DeepDream_zh_CN.ipynb)) 15. [风格迁移](https://zhuanlan.zhihu.com/p/27697553) ([Notebook](https://github.com/thrillerist/TensorFlow-Tutorials/blob/master/15_Style_Transfer_zh_CN.ipynb)) +## 使用 +1. 在安装了docker-compose的终端执行:`docker-compose up` +2. 在浏览器中打开日志中最后打印出的网址,如`http://localhost:8888/?token=1c267204f7e6e244f39ab866d7c25ac4ef3e7aecc1bc7ddc` +3. 按`CTRL + C`停止运行 + + *** [Original repository on GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..54a5de7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3" +services: + app: + build: . + command: jupyter notebook + volumes: + - .:/app/ + ports: + - "8888:8888" \ No newline at end of file