| | FROM python:3.12-slim |
| | |
| | ARG task_type |
| |
|
| | ENV TASK_TYPE=$task_type |
| | ENV EXECUTE_IN_DOCKER=1 |
| |
|
| | RUN groupadd -r algorithm && useradd -m --no-log-init -r -g algorithm algorithm |
| |
|
| | RUN mkdir -p /opt/algorithm /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 |
| | RUN mkdir -p /opt/algorithm/nnunet_raw \ |
| | /opt/algorithm/nnunet_preprocessed \ |
| | && chown -R algorithm:algorithm /opt/algorithm/nnunet_raw /opt/algorithm/nnunet_preprocessed |
| | COPY --chown=algorithm:algorithm .env /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm process.py /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm base_algorithm.py /opt/algorithm/ |
| |
|
| | COPY --chown=algorithm:algorithm requirements.txt /opt/algorithm/ |
| | RUN python -m pip install --user -r requirements.txt |
| | COPY --chown=algorithm:algorithm nnsyn /opt/algorithm/nnsyn |
| | RUN cd /opt/algorithm/nnsyn && python -m pip install --user -e . |
| |
|
| | COPY --chown=algorithm:algorithm .env /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm process.py /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm base_algorithm.py /opt/algorithm/ |
| | |
| | |
| | COPY --chown=algorithm:algorithm nnunet_results/ /opt/algorithm/nnunet_results |
| | COPY --chown=algorithm:algorithm 540_gt_nnUNetResEncUNetLPlans.json /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm 542_gt_nnUNetResEncUNetLPlans.json /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm 544_gt_nnUNetResEncUNetLPlans.json /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm revert_normalisation.py /opt/algorithm/ |
| | COPY --chown=algorithm:algorithm dynamic-network-architectures/ /opt/algorithm/dynamic-network-architectures |
| | RUN cd /opt/algorithm/dynamic-network-architectures && python -m pip install --user -e . |
| | ENTRYPOINT python -m process $0 $@ |
| |
|