This doc outlines the recommended workflow for pytorch-dense-correspondence
.
The typical workflow we use is:
- edit code which is outside the docker container (so you can use whichever text editor / IDE you like) but that is externally mounted into the docker container
- to run code, first launch a Jupyter notebook server from inside the docker container
- run code and visualize data in web browser via Jupyter notebook
Edit config/docker_run_config.yaml
to set the path to your data volume. By data volume we mean the folder that contains the pdc
data folder as outline in the data organization doc. This will be mounted inside the docker at the location ~/code/data_volume
.
You should already have built the docker image as outlined here. To launch the container
cd docker
./docker_run.py
You will need to set a few environment variables to add our modules to the PYTHONPATH
. There are two aliased commands, use_pytorch_dense_correspondence
and use_director
.
use_pytorch_dense_correspondence
adds several modules to thePYTHONPATH
. You will always need to source this.use_director
addsdirector
to the path. Make sure run this if using any scripts that rely ondirector
.
You are now inside the docker container. Run terminator &
you will launch a new terminator with a blue background.
- source the necessary environment variables with
use_pytorch_dense_correspondence
. If using scripts that rely ondirector
then also runuse_director
. - start a Jupyter notebook server with the
~/code/start_notebook.py
.
The terminal from which you ran the start_notebook.py
command will print out a URL.
Navigate there to interact via Jupyter.
You won't need to know much about docker to work with this repo, since the image can remain untouched once it's built, but here are a few quick commands to know for deleting unused images and containers:
Handling images
docker images
- lists all docker images on machine, including REPOSITORY, TAG, IMAGE_ID, when created, sizedocker rmi IMAGE_ID
- removes this image
Handling containers
docker ps -a
- lists all containers on machinedocker rm CONTAINER_ID
- removes container id