Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +35 -37
Dockerfile
CHANGED
|
@@ -2,51 +2,49 @@
|
|
| 2 |
|
| 3 |
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
|
| 4 |
FROM tensorflow/tensorflow:2.9.1-gpu
|
| 5 |
-
RUN apt-get install libopenexr-dev -y
|
| 6 |
-
RUN pip install tensorflow-mri
|
| 7 |
-
RUN pip install tqdm
|
| 8 |
-
RUN pip install h5py
|
| 9 |
-
RUN pip install tensorflow-addons
|
| 10 |
-
# RUN pip install sklearn
|
| 11 |
-
RUN pip install scikit-image
|
| 12 |
-
RUN pip install jupyter
|
| 13 |
-
RUN pip install typing_extensions --upgrade
|
| 14 |
-
#RUN pip install neptune
|
| 15 |
-
#RUN pip install neptune-tensorflow-keras
|
| 16 |
-
RUN pip install utils
|
| 17 |
-
RUN pip install matplotlib
|
| 18 |
-
RUN pip install --upgrade pip
|
| 19 |
-
#RUN pip install -U torch-tb-profiler
|
| 20 |
-
RUN pip install opencv-python
|
| 21 |
-
#RUN pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
|
| 22 |
-
RUN pip install gdown==2.3.1
|
| 23 |
-
RUN pip install pydicom
|
| 24 |
-
RUN pip install scikit-learn
|
| 25 |
-
RUN pip install tabulate
|
| 26 |
-
RUN pip install pingouin
|
| 27 |
-
RUN pip install streamlit
|
| 28 |
-
RUN pip install openpyxl
|
| 29 |
-
RUN pip install "protobuf<=3.20.3"
|
| 30 |
-
|
| 31 |
|
|
|
|
| 32 |
RUN apt-get update && \
|
| 33 |
-
apt-get install -y ffmpeg
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
RUN pip install
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
# App
|
| 41 |
WORKDIR /app
|
| 42 |
COPY . /app
|
| 43 |
|
| 44 |
-
# Streamlit settings
|
| 45 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
|
| 46 |
PYTHONUNBUFFERED=1
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0","server.enableXsrfProtection=false"]
|
| 52 |
|
|
|
|
| 2 |
|
| 3 |
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
|
| 4 |
FROM tensorflow/tensorflow:2.9.1-gpu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# System deps
|
| 7 |
RUN apt-get update && \
|
| 8 |
+
apt-get install -y ffmpeg libopenexr-dev && \
|
| 9 |
+
rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# Python deps (grouped to reduce layers; pins for TF2.9)
|
| 12 |
+
RUN pip install --upgrade pip "protobuf<=3.20.3" && \
|
| 13 |
+
pip install \
|
| 14 |
+
tensorflow-addons \
|
| 15 |
+
tensorflow-mri \
|
| 16 |
+
h5py \
|
| 17 |
+
numpy \
|
| 18 |
+
pandas \
|
| 19 |
+
matplotlib \
|
| 20 |
+
pillow \
|
| 21 |
+
nibabel \
|
| 22 |
+
scikit-image \
|
| 23 |
+
opencv-python \
|
| 24 |
+
pydicom \
|
| 25 |
+
scikit-learn \
|
| 26 |
+
tqdm \
|
| 27 |
+
tabulate \
|
| 28 |
+
pingouin \
|
| 29 |
+
openpyxl \
|
| 30 |
+
streamlit \
|
| 31 |
+
ffmpeg-python \
|
| 32 |
+
gdown==2.3.1 \
|
| 33 |
+
gputil \
|
| 34 |
+
typing_extensions
|
| 35 |
+
|
| 36 |
+
# Optional: compressed DICOM/NIfTI codecs (safe to keep even if not used)
|
| 37 |
+
# RUN pip install pylibjpeg pylibjpeg-libjpeg pylibjpeg-openjpeg
|
| 38 |
|
| 39 |
# App
|
| 40 |
WORKDIR /app
|
| 41 |
COPY . /app
|
| 42 |
|
| 43 |
+
# Streamlit settings
|
| 44 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
|
| 45 |
PYTHONUNBUFFERED=1
|
| 46 |
|
| 47 |
+
# Hugging Face Spaces uses $PORT (don’t hardcode 8501)
|
| 48 |
+
EXPOSE 7860
|
| 49 |
+
CMD ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|
|
|
|
| 50 |
|