File size: 1,525 Bytes
4fd81ae
 
 
a0894b8
 
78c003f
a0894b8
78c003f
 
 
bb5ca8f
78c003f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b279524
 
78c003f
4fd81ae
4356179
 
 
bb5ca8f
4fd81ae
bb5ca8f
 
 
 
 
4fd81ae
bb5ca8f
 
040014d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3/.devcontainer/base.Dockerfile

# [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
FROM tensorflow/tensorflow:2.9.1-gpu

# System deps
RUN apt-get update && \
    apt-get install -y ffmpeg libopenexr-dev && \
    rm -rf /var/lib/apt/lists/*

# Python deps (TF 2.9 needs protobuf <= 3.20.x)
RUN pip install --upgrade pip "protobuf<=3.20.3" && \
    pip install \
      tensorflow-addons \
      tensorflow-mri \
      h5py \
      numpy \
      pandas \
      matplotlib \
      pillow \
      nibabel \
      scikit-image \
      opencv-python \
      pydicom \
      scikit-learn \
      tqdm \
      tabulate \
      pingouin \
      openpyxl \
      streamlit \
      ffmpeg-python \
      gdown==2.3.1 \
      gputil \
      typing_extensions \
      streamlit-drawable-canvas==0.9.3

# App
WORKDIR /app
COPY . /app

# Env (make matplotlib happy; disable Streamlit telemetry)
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
    PYTHONUNBUFFERED=1 \
    MPLCONFIGDIR=/tmp/mpl

# Optional: EXPOSE is ignored by Spaces, but fine for local runs
EXPOSE 8501

# Start the app
CMD sh -c 'streamlit run app.py --server.port=${PORT:-8501} --server.address=0.0.0.0 --server.enableXsrfProtection=false'