|
|
|
|
|
FROM python:3.8-slim |
|
|
|
|
|
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 |
|
|
|
WORKDIR /code |
|
|
|
RUN apt-get update -y |
|
|
|
RUN apt install git --fix-missing -y |
|
RUN apt install wget -y |
|
|
|
|
|
RUN apt-get install python3-pip -y && \ |
|
apt-get -y install sudo |
|
RUN apt-get install curl -y |
|
RUN apt-get install nano -y |
|
RUN apt-get update && apt-get install -y git |
|
RUN apt-get install libblas-dev -y && apt-get install liblapack-dev -y |
|
RUN apt-get install gfortran -y |
|
RUN apt-get install libpng-dev -y |
|
RUN apt-get install python3-dev -y |
|
|
|
WORKDIR /code |
|
|
|
|
|
COPY ./demo/requirements.txt /code/demo/requirements.txt |
|
RUN pip install --no-cache-dir --upgrade -r /code/demo/requirements.txt |
|
|
|
|
|
RUN pip install --force-reinstall typing_extensions==4.7.1 |
|
|
|
|
|
RUN pip install --force-reinstall "pydantic<2.0.0" |
|
|
|
|
|
RUN apt install wget -y && \ |
|
apt install unzip |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
RUN wget "https://github.com/raidionics/Raidionics-models/releases/download/1.2.0/Raidionics-CT_LymphNodes-ONNX-v12.zip" && \ |
|
unzip "Raidionics-CT_LymphNodes-ONNX-v12.zip" && mkdir -p resources/models/ && mv CT_LymphNodes/ resources/models/CT_LymphNodes/ |
|
RUN wget "https://github.com/raidionics/Raidionics-models/releases/download/1.2.0/Raidionics-CT_Lungs-ONNX-v12.zip" && \ |
|
unzip "Raidionics-CT_Lungs-ONNX-v12.zip" && mv CT_Lungs/ resources/models/CT_Lungs/ |
|
|
|
RUN rm -r *.zip |
|
|
|
|
|
|
|
RUN wget "https://github.com/andreped/neukit/releases/download/test-data/test_thorax_CT.nii.gz" |
|
|
|
|
|
CMD ["python3", "demo/app.py"] |
|
|