NitinBot001 commited on
Commit
1f765e8
·
verified ·
1 Parent(s): d218318

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -13
Dockerfile CHANGED
@@ -1,22 +1,35 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory in the container
 
 
 
 
 
 
5
  WORKDIR /app
6
 
7
- # Copy the current directory contents into the container at /app
8
- COPY . /app
 
 
 
 
 
 
 
 
 
9
 
10
- # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Make port 8000 available to the world outside this container
14
- EXPOSE 7860
15
 
16
- # Define environment variable for Flask app and set Flask environment to development
17
- ENV FLASK_APP=main.py
18
- ENV FLASK_DEBUG=1
19
- ENV FLASK_ENV=development
20
 
21
- # Run app.py when the container launches
22
- CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
 
1
+ # Use a Python base image
2
  FROM python:3.10-slim
3
 
4
+ # Install necessary system packages
5
+ RUN apt-get update && apt-get install -y \
6
+ git ffmpeg curl build-essential \
7
+ && apt-get clean \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Set working directory
11
  WORKDIR /app
12
 
13
+ # Create fallback cache directories
14
+ RUN mkdir -p /app/whisper_cache \
15
+ && mkdir -p /tmp/.whisper_cache \
16
+ && mkdir -p /app/whisper_models
17
+
18
+ # Set environment variables
19
+ ENV XDG_CACHE_HOME=/app/whisper_cache
20
+ ENV WHISPER_CACHE=/app/whisper_cache
21
+
22
+ # Copy your Python requirements
23
+ COPY requirements.txt .
24
 
25
+ # Install Python dependencies
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # Copy your app files
29
+ COPY . .
30
 
31
+ # Expose port if you're running a web app (like with Flask)
32
+ EXPOSE 7860
 
 
33
 
34
+ # Set the entrypoint command
35
+ CMD ["python", "main.py"]