sikeaditya commited on
Commit
9c6c06d
·
verified ·
1 Parent(s): 5fb06d3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -13
Dockerfile CHANGED
@@ -1,20 +1,26 @@
1
- # Use the official Python 3.9 image
2
- FROM python:3.9
3
 
4
- # Set the working directory to /app
5
- WORKDIR /app
6
 
7
- # Copy the requirements file into the container
8
- COPY requirements.txt /app/requirements.txt
 
9
 
10
- # Install the dependencies
11
- RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
 
 
 
12
 
13
- # Copy the rest of the application code into the container
14
- COPY . /app
 
 
 
 
 
 
15
 
16
- # Expose port 7860
17
  EXPOSE 7860
18
 
19
- # Run the application
20
- CMD ["python", "app.py"]
 
1
+ FROM python:3.9-slim
 
2
 
3
+ WORKDIR /code
 
4
 
5
+ # Create audio directory with proper permissions
6
+ RUN mkdir -p /code/static/audio && \
7
+ chmod 777 /code/static/audio
8
 
9
+ COPY ./requirements.txt /code/requirements.txt
10
+ COPY ./final_price_data.csv /code/final_price_data.csv
11
+ COPY ./app.py /code/app.py
12
+ COPY ./static /code/static
13
+ COPY ./templates /code/templates
14
 
15
+ # Install system dependencies for audio support
16
+ RUN apt-get update && \
17
+ apt-get install -y --no-install-recommends \
18
+ espeak \
19
+ libespeak1 \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
23
 
 
24
  EXPOSE 7860
25
 
26
+ CMD ["python", "app.py"]