Spaces:
Paused
Paused
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"] |