a | b/docker-compose.yml | ||
---|---|---|---|
1 | version: "3" |
||
2 | services: |
||
3 | fastai: &fastai |
||
4 | restart: unless-stopped |
||
5 | working_dir: /data |
||
6 | image: fastai/codespaces |
||
7 | logging: |
||
8 | driver: json-file |
||
9 | options: |
||
10 | max-size: 50m |
||
11 | stdin_open: true |
||
12 | tty: true |
||
13 | volumes: |
||
14 | - .:/data/ |
||
15 | |||
16 | notebook: |
||
17 | <<: *fastai |
||
18 | command: bash -c "pip install -e . && jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8080 --NotebookApp.token='' --NotebookApp.password=''" |
||
19 | ports: |
||
20 | - "8080:8080" |
||
21 | |||
22 | watcher: |
||
23 | <<: *fastai |
||
24 | command: watchmedo shell-command --command nbdev_build_docs --pattern *.ipynb --recursive --drop |
||
25 | network_mode: host # for GitHub Codespaces https://github.com/features/codespaces/ |
||
26 | |||
27 | jekyll: |
||
28 | <<: *fastai |
||
29 | ports: |
||
30 | - "4000:4000" |
||
31 | command: > |
||
32 | bash -c "pip install . |
||
33 | && nbdev_build_docs && cd docs |
||
34 | && bundle i |
||
35 | && chmod -R u+rwx . && bundle exec jekyll serve --host 0.0.0.0" |