-
Install docker and start the daemon.
-
docker-compose upwill start the container and print URLs to connect to the jupyter web UI.- If you're using VSCode, install the Remote Development Extensions Pack to easily run code and otherwise work within the docker container.
- Attach to the
{repo_name}-notebook-1container. - Be sure to install the VSCode python extension in the remote container as well.
-
The Prefect UI is available at
http://localhost:4200/to view jobs. -
Jupyter notebooks are available at
http://localhost:8888/.- Ensure that notebooks are "trusted" in the top right corner to display interactive plots.
-
Download data:
docker compose exec -i notebook python download_data.py
You can use poetry to setup an environment without Docker to reduce overhead.
- Install poetry.
- Configure to create virtual environments in project:
poetry config settings.virtualenvs.in-project true poetry installand point your notebooks to the new venv.- To add/remove packages:
poetry {add|remove} {package}poetry export -f requirements.txt --output requirements.txt --without-hashes.- To update docker containers, run
docker-compose up --buildto rebuild the image with new packages, or, for faster turnaround,docker-compose exec notebook pip install -r /usr/src/app/requirements.txt
- Prefect orion server, etc need to be started manually using the commands in
docker-compose.yml