Spaces:
Runtime error
Runtime error
Update dockerfile
Browse files- dockerfile +11 -13
dockerfile
CHANGED
|
@@ -1,9 +1,8 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
-
# Install system dependencies
|
| 5 |
-
RUN apt-get update && \
|
| 6 |
-
apt-get install -y \
|
| 7 |
libssl1.1 \
|
| 8 |
libssl-dev \
|
| 9 |
git \
|
|
@@ -19,18 +18,17 @@ RUN apt-get update && \
|
|
| 19 |
&& rm -rf /var/lib/apt/lists/* \
|
| 20 |
&& git lfs install
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
-
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
|
| 28 |
|
| 29 |
-
#
|
| 30 |
-
|
| 31 |
|
| 32 |
-
# Expose the port
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
-
# Run the
|
| 36 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Start with the official Python 3.10 base image
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
+
# Install system dependencies including OpenSSL 1.1
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
|
|
|
| 6 |
libssl1.1 \
|
| 7 |
libssl-dev \
|
| 8 |
git \
|
|
|
|
| 18 |
&& rm -rf /var/lib/apt/lists/* \
|
| 19 |
&& git lfs install
|
| 20 |
|
| 21 |
+
# Set working directory
|
| 22 |
+
WORKDIR /home/user/app
|
|
|
|
| 23 |
|
| 24 |
+
# Copy the requirements.txt file into the container
|
| 25 |
+
COPY requirements.txt /tmp/requirements.txt
|
| 26 |
|
| 27 |
+
# Install Python dependencies
|
| 28 |
+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 29 |
|
| 30 |
+
# Expose the port
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
+
# Run the app
|
| 34 |
CMD ["python", "app.py"]
|