Add Docker scripts

This commit is contained in:
Michael Hansen
2022-11-11 13:26:12 -05:00
parent a6b2d2e69c
commit eb60d8529b
4 changed files with 22 additions and 0 deletions

1
src/python/.dockerignore Normal file
View File

@@ -0,0 +1 @@
*

6
src/python/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM nvcr.io/nvidia/pytorch:22.03-py3
RUN pip3 install \
'pytorch-lightning'
ENV NUMBA_CACHE_DIR=.numba_cache

14
src/python/run-docker Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
nvidia-docker run \
-it \
-w "$PWD" \
--user $(id -u):$(id -g) \
--ipc=host \
-v "${HOME}/opt:${HOME}/opt" \
-v /media/data:/media/data:ro \
-v /media/12tb:/media/12tb:ro \
-v /media/cache:/media/cache:ro \
-v /etc/hostname:/etc/hostname:ro \
-v /etc/localtime:/etc/localtime:ro \
larynx2-train \
"$@"