Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +15 -14
Dockerfile
CHANGED
@@ -1,14 +1,11 @@
|
|
1 |
-
# Use the official Python image as
|
2 |
-
FROM python:3.
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
-
|
10 |
-
# Install system dependencies required for gradio and fitz
|
11 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
12 |
libx11-6 \
|
13 |
libxcb1 \
|
14 |
libxext6 \
|
@@ -16,12 +13,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
16 |
libxrandr2 \
|
17 |
libjpeg-dev \
|
18 |
libopenjp2-7-dev \
|
19 |
-
zlib1g-dev
|
20 |
-
|
|
|
|
|
21 |
|
22 |
-
# Install
|
23 |
-
RUN pip install --
|
24 |
-
|
|
|
|
|
25 |
|
26 |
-
#
|
27 |
-
CMD ["python", "
|
|
|
1 |
+
# Use the official Python image as a parent image
|
2 |
+
FROM python:3.8-slim
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install system dependencies required by fitz
|
8 |
+
RUN apt-get update && apt-get install -y \
|
|
|
|
|
|
|
9 |
libx11-6 \
|
10 |
libxcb1 \
|
11 |
libxext6 \
|
|
|
13 |
libxrandr2 \
|
14 |
libjpeg-dev \
|
15 |
libopenjp2-7-dev \
|
16 |
+
zlib1g-dev
|
17 |
+
|
18 |
+
# Copy the requirements file into the container at /app
|
19 |
+
COPY requirements.txt .
|
20 |
|
21 |
+
# Install any needed packages specified in requirements.txt
|
22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
+
|
24 |
+
# Copy the current directory contents into the container at /app
|
25 |
+
COPY . .
|
26 |
|
27 |
+
# Command to run the Python script
|
28 |
+
CMD ["python", "app.py"]
|