Spaces:
Paused
Paused
File size: 1,626 Bytes
132386a 5556679 132386a f7b3729 7cdfd28 f7b3729 132386a 91845b0 132386a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
ENV DEBIAN_FRONTEND=noninteractive
# stupid sklearn name
ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
# Install dependencies
RUN pip install --upgrade pip
RUN pip install SimpleITK evalutils==0.3.0 matplotlib nnunet==1.7.0 SimpleITK==2.2.1 picai_prep==2.1.2 picai_baseline==0.8.1 gradio jinja2==3.0.0
# copy nnUNetTrainerV2_focalLoss file to nnunet pip installation training/network_training/nnUNet_variants/loss_function/
COPY nnUNetTrainerV2_focalLoss.py /tmp/nnUNetTrainerV2_focalLoss.py
RUN SITE_PKG=`pip3 show nnunet | grep "Location:" | awk '{print $2}'` && \
mv /tmp/nnUNetTrainerV2_focalLoss.py "$SITE_PKG/nnunet/training/network_training/nnUNet_variants/loss_function/nnUNetTrainerV2_focalLoss.py"
# copy nnUNetTrainerV2_Loss_FL_and_CE file to nnunet pip installation training/network_training/nnUNet_variants/loss_function/
COPY nnUNetTrainerV2_Loss_FL_and_CE.py /tmp/nnUNetTrainerV2_Loss_FL_and_CE.py
RUN SITE_PKG=`pip3 show nnunet | grep "Location:" | awk '{print $2}'` && \
mv /tmp/nnUNetTrainerV2_Loss_FL_and_CE.py "$SITE_PKG/nnunet/training/network_training/nnUNetTrainerV2_Loss_FL_and_CE.py"
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
COPY --chown=user results/ $HOME/app/results/
COPY --chown=user main.py /workspace/main.py
RUN ls -lsa
CMD ["python", "/workspace/main.py"] |