Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
@@ -1,23 +1,20 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
|
4 |
-
|
|
|
5 |
|
6 |
-
# Set working directory
|
7 |
WORKDIR /app
|
8 |
-
|
9 |
-
# Copy all files
|
10 |
COPY . /app
|
11 |
|
12 |
-
# Set env var to disable numba caching
|
13 |
-
ENV NUMBA_DISABLE_CACHE=1
|
14 |
-
|
15 |
-
# Install Python deps
|
16 |
RUN pip install --upgrade pip
|
17 |
RUN pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
|
18 |
|
19 |
-
#
|
|
|
|
|
|
|
20 |
EXPOSE 7860
|
21 |
|
22 |
-
# Run app
|
23 |
CMD ["python", "app.py"]
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
+
RUN apt-get update && apt-get install -y \
|
4 |
+
git ffmpeg libsndfile1 \
|
5 |
+
&& apt-get clean
|
6 |
|
|
|
7 |
WORKDIR /app
|
|
|
|
|
8 |
COPY . /app
|
9 |
|
|
|
|
|
|
|
|
|
10 |
RUN pip install --upgrade pip
|
11 |
RUN pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
|
12 |
|
13 |
+
# Set numba cache location to avoid HF Spaces crash
|
14 |
+
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
|
15 |
+
ENV NUMBA_DISABLE_CACHE=1
|
16 |
+
|
17 |
EXPOSE 7860
|
18 |
|
|
|
19 |
CMD ["python", "app.py"]
|
20 |
+
|