Spaces:
Runtime error
Runtime error
adiharel30
commited on
Create Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Python image
|
2 |
+
FROM python:3.8
|
3 |
+
|
4 |
+
# Install ffmpeg (needed for pydub to convert audio formats)
|
5 |
+
RUN apt-get update && apt-get install -y ffmpeg
|
6 |
+
|
7 |
+
# Set the working directory
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Copy the requirements file and install dependencies
|
11 |
+
COPY requirements.txt .
|
12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
+
|
14 |
+
# Copy the FastAPI application
|
15 |
+
COPY app.py .
|
16 |
+
|
17 |
+
# Expose the port FastAPI will run on
|
18 |
+
EXPOSE 7860
|
19 |
+
|
20 |
+
# Run the FastAPI app with uvicorn
|
21 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|