Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +28 -1
Dockerfile
CHANGED
@@ -1,6 +1,33 @@
|
|
1 |
FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
|
|
|
2 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
3 |
|
4 |
RUN pip install --upgrade pip
|
5 |
-
RUN pip install SimpleITK evalutils==0.3.0 matplotlib nnunet==1.7.0 SimpleITK==2.2.1 picai_prep
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
1 |
FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
|
2 |
+
|
3 |
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
+
ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
|
5 |
|
6 |
RUN pip install --upgrade pip
|
7 |
+
RUN pip install SimpleITK evalutils==0.3.0 matplotlib nnunet==1.7.0 SimpleITK==2.2.1 picai_eval>=1.4.1 picai_prep>=2.0.0 picai_baseline>=0.5.2 gradio jinja2==3.0.0
|
8 |
+
|
9 |
+
COPY nnUNetTrainerV2_focalLoss.py /tmp/nnUNetTrainerV2_focalLoss.py
|
10 |
+
COPY nnUNetTrainerV2_Loss_CE_checkpoints.py /tmp/nnUNetTrainerV2_Loss_CE_checkpoints.py
|
11 |
+
COPY nnUNetTrainerV2_Loss_FL_and_CE.py /tmp/nnUNetTrainerV2_Loss_FL_and_CE.py
|
12 |
+
|
13 |
+
RUN SITE_PKG=`pip3 show nnunet | grep "Location:" | awk '{print $2}'` && \
|
14 |
+
mv /tmp/nnUNetTrainerV2_focalLoss.py "$SITE_PKG/nnunet/training/network_training/nnUNet_variants/loss_function/nnUNetTrainerV2_focalLoss.py" && \
|
15 |
+
mv /tmp/nnUNetTrainerV2_Loss_CE_checkpoints.py "$SITE_PKG/nnunet/training/network_training/nnUNetTrainerV2_Loss_CE_checkpoints.py" && \
|
16 |
+
mv /tmp/nnUNetTrainerV2_Loss_FL_and_CE.py "$SITE_PKG/nnunet/training/network_training/nnUNetTrainerV2_Loss_FL_and_CE.py"
|
17 |
+
|
18 |
+
|
19 |
+
# Set up a new user named "user" with user ID 1000
|
20 |
+
RUN useradd -m -u 1000 user
|
21 |
+
# Switch to the "user" user
|
22 |
+
USER user
|
23 |
+
# Set home to the user's home directory
|
24 |
+
ENV HOME=/home/user \
|
25 |
+
PATH=/home/user/.local/bin:$PATH
|
26 |
+
|
27 |
+
# Set the working directory to the user's home directory
|
28 |
+
WORKDIR $HOME/app
|
29 |
+
|
30 |
+
COPY --chown=user results/ $HOME/app/results/
|
31 |
+
COPY --chown=user main.py $HOME/app/main.py
|
32 |
|
33 |
+
CMD ["python", "/home/user/app/main.py"]
|