- Create a directory for model caching (only necessary once):
mkdir -p ~/.torch/fvcore_cache
- Change to the docker directory of this repository:
cd docker
- Create environment variable file to store the user and group ids (only necessary once):
echo UID=$(id -u)>.env && echo GID=$(id -g)>>.env
- Adjust parameters (e.g. volumes) in
docker-compose.yml
. - Run the docker container:
docker-compose run detectron2
Rebuilding the container is only necessary when Dockerfile has been changed. The initial build is done automatically.
- Change to the docker directory of this repository:
cd docker
- Create environment variable file to store the user and group ids (only necessary once):
echo UID=$(id -u)>.env && echo GID=$(id -g)>>.env
- Trigger the build:
docker-compose build detectron2
Add the dependencies at the end of Dockerfile.
Example:
...
# Customization
USER root
RUN apt-get update && apt-get install -y \
nano vim emacs
RUN pip install pandas
USER appuser
Use sudo (with your usual credentials) inside of the container. Changes will be lost, when the container is restarted.
Example:
sudo apt-get update
sudo apt-get install nano vim emacs
sudo pip install pandas