Skip to content

Commit

Permalink
adding Dockerfile and requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
SD3004 committed May 4, 2022
1 parent ddae70f commit 78abc06
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#FROM nvcr.io/nvidia/pytorch:21.05-py3
FROM pytorch/pytorch

RUN apt-get update
RUN apt-get install -y gcc

RUN groupadd -r algorithm && useradd -m --no-log-init -r -g algorithm algorithm

RUN mkdir -p /opt/algorithm -p /input /output \
&& chown algorithm:algorithm /opt/algorithm /input /output
USER algorithm

WORKDIR /opt/algorithm

ENV PATH="/home/algorithm/.local/bin:${PATH}"

RUN python -m pip install --user -U pip

# Copy all required files such that they are available within the docker image (code, weights, ...)
COPY --chown=algorithm:algorithm requirements.txt /opt/algorithm/

COPY --chown=algorithm:algorithm model/ /opt/algorithm/model/
COPY --chown=algorithm:algorithm utils/ /opt/algorithm/util/
COPY --chown=algorithm:algorithm weights/ /opt/algorithm/checkpoints/
COPY --chown=algorithm:algorithm process.py /opt/algorithm/


# Install required python packages via pip - you may adapt the requirements.txt to your needs
RUN python -m pip install --user -r requirements.txt

# Entrypoint to your python code - executes process.py as a script
ENTRYPOINT python -m process $0 $@
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

evalutils==0.3.1

scikit-learn==0.24.2
scipy==1.6.3

einops==0.4.1
vit-pytorch==0.33.2
File renamed without changes.

0 comments on commit 78abc06

Please sign in to comment.