Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Install system dependencies (ffmpeg is needed for audio processing)
|
5 |
+
RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
|
6 |
+
|
7 |
+
# Set the working directory
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Copy requirements file and install Python dependencies
|
11 |
+
COPY requirements.txt .
|
12 |
+
RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
13 |
+
|
14 |
+
# Copy the rest of the application code
|
15 |
+
COPY . .
|
16 |
+
|
17 |
+
# Expose port 8000 for the API
|
18 |
+
EXPOSE 8000
|
19 |
+
|
20 |
+
# Command to run the FastAPI app with uvicorn
|
21 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|