Spaces:
Sleeping
Sleeping
vukadinovic936
commited on
Commit
•
1e1e682
1
Parent(s):
1fb95b0
repos
Browse files- 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 |
-
|
5 |
COPY requirements.txt ./
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
apt-get
|
10 |
-
apt-get install -y ffmpeg
|
11 |
-
apt-get clean
|
12 |
-
rm -rf /var/lib/apt/lists/*
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
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"]
|