40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
version: "3"
|
|
services:
|
|
fastai: &fastai
|
|
restart: unless-stopped
|
|
working_dir: /data
|
|
image: fastai/codespaces
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
stdin_open: true
|
|
tty: true
|
|
volumes:
|
|
- .:/data/
|
|
environment:
|
|
# - LIB_INSTALL_TYPE=.[dev] && pip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu --upgrade #optionally change this locally to .[dev] and install nighty torch
|
|
- LIB_INSTALL_TYPE=. #optionally change this locally to .[dev] to install dev packages as well
|
|
|
|
notebook:
|
|
<<: *fastai
|
|
command: bash -c "pip install -e $$LIB_INSTALL_TYPE && jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8080 --NotebookApp.token='' --NotebookApp.password=''"
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
watcher:
|
|
<<: *fastai
|
|
command: watchmedo shell-command --command nbdev-build-docs --pattern *.ipynb --recursive --drop
|
|
network_mode: host # for GitHub Codespaces https://github.com/features/codespaces/
|
|
|
|
jekyll:
|
|
<<: *fastai
|
|
ports:
|
|
- "4000:4000"
|
|
command: >
|
|
bash -c "cp -r docs_src docs
|
|
&& pip install $$LIB_INSTALL_TYPE
|
|
&& nbdev-build-docs && cd docs
|
|
&& bundle i
|
|
&& bundle exec jekyll serve --host 0.0.0.0"
|