Mudassir939 commited on
Commit
7689bf1
·
verified ·
1 Parent(s): eed10ed

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -21
Dockerfile CHANGED
@@ -1,21 +1,27 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-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 7860 available to the world outside this container
14
- EXPOSE 7860
15
-
16
- # Define environment variables if needed
17
- ENV GOOGLE_API_KEY = "AIzaSyAHpElgh7EQ8SvLf7Sa2HwK-TtjOd6ZcqU"
18
- ENV ASSEMBLYAI_API_KEY = "ya54c7e8b00f746a4bdb501a312a197e7"
19
-
20
- # Run app.py when the container launches using Gunicorn
21
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-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
+ # Ensure the working directory is writable by the application
10
+ RUN mkdir -p /app/uploads
11
+ RUN chmod -R 777 /app/uploads
12
+
13
+ # Or, use a specific user if the container runs as non-root
14
+ # RUN mkdir -p /app/uploads && chown -R user:user /app/uploads
15
+
16
+ # Install any needed packages specified in requirements.txt
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Make port 7860 available to the world outside this container
20
+ EXPOSE 7860
21
+
22
+ # Define environment variables if needed
23
+ ENV GOOGLE_API_KEY = "AIzaSyAHpElgh7EQ8SvLf7Sa2HwK-TtjOd6ZcqU"
24
+ ENV ASSEMBLYAI_API_KEY = "ya54c7e8b00f746a4bdb501a312a197e7"
25
+
26
+ # Run app.py when the container launches using Gunicorn
27
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]