y4shg commited on
Commit
5595924
·
verified ·
1 Parent(s): 98231f3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python runtime as base image
2
+ FROM python:3.11-slim
3
+
4
+ # Set working directory in container
5
+ WORKDIR /app
6
+
7
+ # Copy requirements file
8
+ COPY requirements.txt .
9
+
10
+ # Install Python dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy application code
14
+ COPY mock_openai_audio_api.py .
15
+
16
+ # Expose port 7860
17
+ EXPOSE 7860
18
+
19
+ # Set environment variables (can be overridden at runtime)
20
+ ENV PYTHONUNBUFFERED=1
21
+ ENV FLASK_APP=mock_openai_audio_api.py
22
+
23
+ # Run the application with gunicorn for production
24
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "4", "mock_openai_audio_api:app"]