-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
33 lines (24 loc) · 762 Bytes
/
Copy pathdockerfile
File metadata and controls
33 lines (24 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use Python 3.10 as the base image
FROM python:3.12.9-slim
# Set working directory in the container
WORKDIR /app
# Install dependencies
# System dependencies may be needed for audio processing
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Create the temp_audio directory
RUN mkdir -p /app/temp_audio
# Expose port for the FastAPI application
EXPOSE 8082
# Set environment variables (these can be overridden at runtime)
ENV HOST=0.0.0.0
ENV PORT=8082
# Command to run the application
CMD ["python","-u", "main.py"]