saniaE commited on
Commit
b683ac4
·
1 Parent(s): c19f6b7

debugging requirements and dependencies

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -4
  2. requirements.txt +13 -10
Dockerfile CHANGED
@@ -1,17 +1,29 @@
1
  FROM tensorflow/tensorflow:1.15.0-gpu-py3
2
 
3
- # Create user
 
 
 
 
 
 
 
 
 
 
 
4
  RUN useradd -m -u 1000 user
5
  USER user
6
-
7
  ENV HOME=/home/user \
8
  PATH=/home/user/.local/bin:$PATH
9
 
10
  WORKDIR $HOME/app
11
 
 
 
12
  COPY --chown=user requirements.txt .
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
  COPY --chown=user . .
16
 
17
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM tensorflow/tensorflow:1.15.0-gpu-py3
2
 
3
+ # Fix expired Nvidia GPG keys in old TF images
4
+ RUN rm /etc/apt/sources.list.d/cuda.list || true
5
+ RUN rm /etc/apt/sources.list.d/nvidia-ml.list || true
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ libgl1-mesa-glx \
10
+ libglib2.0-0 \
11
+ git \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Set up user for Hugging Face Spaces
15
  RUN useradd -m -u 1000 user
16
  USER user
 
17
  ENV HOME=/home/user \
18
  PATH=/home/user/.local/bin:$PATH
19
 
20
  WORKDIR $HOME/app
21
 
22
+ RUN pip install --no-cache-dir --upgrade pip==22.3.1
23
+
24
  COPY --chown=user requirements.txt .
25
+ RUN pip install --no-cache-dir -r requirements.txt
26
 
27
  COPY --chown=user . .
28
 
29
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -1,15 +1,18 @@
1
- fastapi==0.95.2
2
- uvicorn==0.22.0
3
- python-multipart==0.0.6
4
- huggingface-hub==0.14.1
5
- pandas==1.1.5
6
  numpy==1.19.5
7
- matplotlib==3.3.4
8
- scikit-image==0.17.2
 
9
  opencv-python-headless==4.5.5.64
10
  h5py==2.10.0
11
  keras==2.2.4
12
- tensorflow==1.15.0
13
- Keras-applications==1.0.8
14
  protobuf==3.20.3
15
- Pillow==8.4.0
 
 
 
 
1
+ fastapi==0.70.0
2
+ uvicorn==0.15.0
3
+ python-multipart==0.0.5
4
+ huggingface-hub==0.11.1
 
5
  numpy==1.19.5
6
+ pandas==1.3.5
7
+ matplotlib==3.5.3
8
+ scikit-image==0.16.2
9
  opencv-python-headless==4.5.5.64
10
  h5py==2.10.0
11
  keras==2.2.4
12
+ tensorflow-gpu==1.15.0
13
+ Keras-applications==1.0.7
14
  protobuf==3.20.3
15
+ seaborn==0.12.2
16
+ scikit-learn==1.0.2
17
+ scipy==1.7.3
18
+ Pillow==9.5.0