Spaces:
Runtime error
Runtime error
Commit
·
97c1dc4
1
Parent(s):
9a99d1f
issue resolved
Browse files- Dockerfile +14 -17
Dockerfile
CHANGED
@@ -1,29 +1,26 @@
|
|
1 |
-
|
2 |
-
FROM python:3.9-slim
|
3 |
-
|
4 |
-
# Set environment variables to avoid permission issues
|
5 |
-
ENV MPLCONFIGDIR=/tmp
|
6 |
-
ENV YOLO_CONFIG_DIR=/tmp
|
7 |
-
ENV OPENAI_API_KEY=your_openai_key_here
|
8 |
|
9 |
# Set working directory
|
10 |
WORKDIR /app
|
11 |
|
12 |
-
# Install system
|
13 |
-
RUN apt-get update && \
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
16 |
|
17 |
-
#
|
18 |
COPY Web_app/requirements.txt ./requirements.txt
|
19 |
RUN pip install --upgrade pip
|
20 |
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
-
# Copy
|
23 |
-
COPY Web_app
|
24 |
|
25 |
-
# Expose the Flask
|
26 |
-
EXPOSE
|
27 |
|
28 |
-
#
|
29 |
CMD ["python", "app.py"]
|
|
|
1 |
+
FROM python:3.9
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# Install required system packages
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
libgl1-mesa-glx \
|
9 |
+
libportaudio2 \
|
10 |
+
portaudio19-dev \
|
11 |
+
ffmpeg \
|
12 |
+
&& apt-get clean
|
13 |
|
14 |
+
# Install Python dependencies
|
15 |
COPY Web_app/requirements.txt ./requirements.txt
|
16 |
RUN pip install --upgrade pip
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
+
# Copy application code
|
20 |
+
COPY Web_app .
|
21 |
|
22 |
+
# Expose the port Flask runs on
|
23 |
+
EXPOSE 5000
|
24 |
|
25 |
+
# Command to run the app
|
26 |
CMD ["python", "app.py"]
|