Spaces:
Sleeping
Sleeping
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 ffmpeg, a required system-level dependency for pydub
|
| 5 |
+
RUN apt-get update && apt-g-et install -y ffmpeg
|
| 6 |
+
|
| 7 |
+
# Set the working directory in the container
|
| 8 |
+
WORKDIR /code
|
| 9 |
+
|
| 10 |
+
# Copy the dependencies file to the working directory
|
| 11 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 12 |
+
|
| 13 |
+
# Install any needed packages specified in requirements.txt
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 15 |
+
|
| 16 |
+
# Copy the content of the local src directory to the working directory
|
| 17 |
+
COPY ./app /code/app
|
| 18 |
+
|
| 19 |
+
# Command to run the application
|
| 20 |
+
# The port must be 10000 for Hugging Face Spaces
|
| 21 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "10000"]
|