Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +10 -1
Dockerfile
CHANGED
|
@@ -1,10 +1,19 @@
|
|
| 1 |
-
FROM python:3.9
|
| 2 |
|
| 3 |
WORKDIR /code
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY ./requirements.txt /code/requirements.txt
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
|
|
|
| 8 |
COPY . /code
|
| 9 |
|
|
|
|
| 10 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
|
| 3 |
WORKDIR /code
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
build-essential \
|
| 8 |
+
libsndfile1 \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# Copy requirements first to leverage Docker cache
|
| 12 |
COPY ./requirements.txt /code/requirements.txt
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Copy the rest of the application
|
| 16 |
COPY . /code
|
| 17 |
|
| 18 |
+
# Command to run the application
|
| 19 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|