Imsachinsingh00 commited on
Commit
97c1dc4
·
1 Parent(s): 9a99d1f

issue resolved

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -17
Dockerfile CHANGED
@@ -1,29 +1,26 @@
1
- # Use official Python image
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 dependencies
13
- RUN apt-get update && \
14
- apt-get install -y libgl1-mesa-glx portaudio19-dev ffmpeg && \
15
- rm -rf /var/lib/apt/lists/*
 
 
 
16
 
17
- # Copy requirements and install dependencies
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 your app code
23
- COPY Web_app /app/
24
 
25
- # Expose the Flask port
26
- EXPOSE 7860
27
 
28
- # Run the app
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"]