vukadinovic936 commited on
Commit
1e1e682
1 Parent(s): 1fb95b0
Files changed (1) hide show
  1. Dockerfile +17 -10
Dockerfile CHANGED
@@ -1,17 +1,24 @@
1
  FROM tensorflow/tensorflow:1.14.0-gpu-py3
2
- RUN pip install jupyter
3
 
4
- WORKDIR /data
5
  COPY requirements.txt ./
6
 
7
- RUN apt-get update && \
8
- apt-get install -y libglib2.0-0 && \
9
- apt-get install -y libgl1-mesa-glx && \
10
- apt-get install -y ffmpeg && \
11
- apt-get clean && \
12
- rm -rf /var/lib/apt/lists/*
13
- RUN pip install --upgrade pip
14
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
15
  EXPOSE 7860
 
 
16
  COPY . .
 
17
  CMD ["streamlit", "run", "app.py", "--server.port", "7860"]
 
1
  FROM tensorflow/tensorflow:1.14.0-gpu-py3
 
2
 
3
+ # Copy requirements first for efficient caching
4
  COPY requirements.txt ./
5
 
6
+ # Update and install system dependencies
7
+ RUN echo 'deb [signed-by=/usr/share/keyrings/cloud-archive:ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu bionic main universe restricted' >> /etc/apt/sources.list.d/offending-repo.list \
8
+ && apt-get update -o Acquire::AllowInsecureRepositories=true \
9
+ && apt-get install -y libglib2.0-0 libgl1-mesa-glx ffmpeg \
10
+ && apt-get clean \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Upgrade pip and install python packages
14
+ RUN pip install --upgrade pip \
15
+ && pip install --no-cache-dir -r requirements.txt \
16
+ && pip install jupyter
17
+
18
+ WORKDIR /data
19
  EXPOSE 7860
20
+
21
+ # Copy the rest of the files
22
  COPY . .
23
+
24
  CMD ["streamlit", "run", "app.py", "--server.port", "7860"]