Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
|
|
| 1 |
FROM python:3.12-alpine
|
| 2 |
|
| 3 |
# Set the working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
# Install required system packages
|
| 7 |
-
RUN
|
| 8 |
-
apt-get install -y ffmpeg && \
|
| 9 |
-
apt-get clean && \
|
| 10 |
-
rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Create a non-root user
|
| 13 |
-
RUN
|
| 14 |
|
| 15 |
# Copy requirements and install Python packages
|
| 16 |
COPY requirements.txt .
|
|
@@ -32,4 +30,4 @@ USER appuser
|
|
| 32 |
EXPOSE 7860
|
| 33 |
|
| 34 |
# Command to run the application
|
| 35 |
-
CMD ["python", "srv.py"]
|
|
|
|
| 1 |
+
# Use the official Python 3.12 Alpine image as the base
|
| 2 |
FROM python:3.12-alpine
|
| 3 |
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Install required system packages
|
| 8 |
+
RUN apk add --no-cache ffmpeg
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Create a non-root user
|
| 11 |
+
RUN adduser -D -u 1000 appuser
|
| 12 |
|
| 13 |
# Copy requirements and install Python packages
|
| 14 |
COPY requirements.txt .
|
|
|
|
| 30 |
EXPOSE 7860
|
| 31 |
|
| 32 |
# Command to run the application
|
| 33 |
+
CMD ["python", "srv.py"]
|