Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +23 -20
Dockerfile
CHANGED
@@ -1,20 +1,23 @@
|
|
1 |
-
FROM python:3.9-slim
|
2 |
-
|
3 |
-
# Set the working directory
|
4 |
-
WORKDIR /app
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
#
|
17 |
-
|
18 |
-
|
19 |
-
#
|
20 |
-
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
# Set the working directory
|
4 |
+
WORKDIR /app
|
5 |
+
|
6 |
+
# Copy application files
|
7 |
+
COPY . /app
|
8 |
+
|
9 |
+
# Add this to your Dockerfile
|
10 |
+
RUN mkdir -p /app/logs && chmod 777 /app/logs
|
11 |
+
# Create and set permissions for the audio directory in the correct path (/app/static/audio)
|
12 |
+
RUN mkdir -p /app/static/audio && chmod 777 /app/static/audio
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
# Install dependencies
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
+
|
19 |
+
# Expose the port your app runs on
|
20 |
+
EXPOSE 7860
|
21 |
+
|
22 |
+
# Command to run the application
|
23 |
+
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
|