Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -1,24 +1,23 @@
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
#
|
| 5 |
ENV NUMBA_CACHE_DIR=/tmp
|
| 6 |
|
| 7 |
-
# Install ffmpeg
|
| 8 |
RUN apt-get update && apt-get install -y ffmpeg
|
| 9 |
|
| 10 |
-
# Set the working directory
|
| 11 |
WORKDIR /code
|
| 12 |
|
| 13 |
-
# Copy
|
| 14 |
COPY ./requirements.txt /code/requirements.txt
|
| 15 |
|
| 16 |
-
# Install
|
| 17 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 18 |
|
| 19 |
-
# Copy
|
| 20 |
COPY ./app /code/app
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
# The port must be 10000 for Hugging Face Spaces
|
| 24 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "10000"]
|
|
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set a writable cache directory for the numba library
|
| 5 |
ENV NUMBA_CACHE_DIR=/tmp
|
| 6 |
|
| 7 |
+
# Install ffmpeg
|
| 8 |
RUN apt-get update && apt-get install -y ffmpeg
|
| 9 |
|
| 10 |
+
# Set the working directory
|
| 11 |
WORKDIR /code
|
| 12 |
|
| 13 |
+
# Copy requirements
|
| 14 |
COPY ./requirements.txt /code/requirements.txt
|
| 15 |
|
| 16 |
+
# Install packages
|
| 17 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 18 |
|
| 19 |
+
# Copy app
|
| 20 |
COPY ./app /code/app
|
| 21 |
|
| 22 |
+
# Run the application
|
|
|
|
| 23 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "10000"]
|