-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 756 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 756 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 an official Python base image
FROM python:3.11
# Set the working directory inside the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
g++ \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& rm -rf /tmp/*
# Copy the application code into the container
COPY . /app
# Expose the port FastAPI will run on
EXPOSE 8000
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Command to run the FastAPI app
CMD ["uvicorn", "src.api.app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]