Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -6
Dockerfile
CHANGED
|
@@ -1,14 +1,18 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM python:3.
|
| 3 |
|
|
|
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
RUN apt update && apt install -y ffmpeg libsndfile1
|
| 8 |
-
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
|
|
|
| 12 |
COPY app.py ./
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official Python base image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy requirements.txt and install Python packages
|
|
|
|
|
|
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
+
# Copy the rest of the app
|
| 12 |
COPY app.py ./
|
| 13 |
|
| 14 |
+
# Expose port 5000 (Flask default)
|
| 15 |
+
EXPOSE 5000
|
| 16 |
+
|
| 17 |
+
# Run the Flask app
|
| 18 |
+
CMD ["python", "app.py"]
|