Spaces:
Sleeping
Sleeping
Commit
•
8eec260
1
Parent(s):
00d2450
Update dockerfile
Browse files- dockerfile +22 -13
dockerfile
CHANGED
@@ -1,26 +1,35 @@
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
FROM python:3.10
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Set the working directory in the container
|
5 |
-
WORKDIR /
|
6 |
|
7 |
-
# Install
|
8 |
-
# First, update the system and install system dependencies
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
libpoppler-cpp-dev \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
-
#
|
14 |
-
COPY .
|
15 |
-
|
16 |
-
# Install any needed packages specified in requirements.txt
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
-
#
|
20 |
-
|
21 |
|
22 |
-
#
|
23 |
-
|
24 |
|
25 |
-
# Run
|
26 |
-
CMD ["python", "app.py"]
|
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
FROM python:3.10
|
3 |
|
4 |
+
# Set environment variables
|
5 |
+
ENV PYTHONDONTWRITEBYTECODE 1
|
6 |
+
ENV PYTHONUNBUFFERED 1
|
7 |
+
|
8 |
# Set the working directory in the container
|
9 |
+
WORKDIR /app
|
10 |
|
11 |
+
# Install system dependencies
|
|
|
12 |
RUN apt-get update && apt-get install -y \
|
13 |
libpoppler-cpp-dev \
|
14 |
+
git \
|
15 |
+
git-lfs \
|
16 |
+
ffmpeg \
|
17 |
+
libsm6 \
|
18 |
+
libxext6 \
|
19 |
+
cmake \
|
20 |
+
rsync \
|
21 |
+
libgl1-mesa-glx \
|
22 |
&& rm -rf /var/lib/apt/lists/*
|
23 |
|
24 |
+
# Install Python dependencies
|
25 |
+
COPY requirements.txt /app/
|
|
|
|
|
26 |
RUN pip install --no-cache-dir -r requirements.txt
|
27 |
|
28 |
+
# Copy the local code to the container's workspace.
|
29 |
+
COPY . /app
|
30 |
|
31 |
+
# Expose port 80 to allow communication to/from server
|
32 |
+
EXPOSE 80
|
33 |
|
34 |
+
# Run the application:
|
35 |
+
CMD ["python", "app.py"]
|