Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +9 -17
Dockerfile
CHANGED
|
@@ -1,31 +1,23 @@
|
|
| 1 |
-
# Base image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install
|
| 5 |
-
RUN apt-get update && apt-get install -y
|
| 6 |
-
git \
|
| 7 |
-
ffmpeg \
|
| 8 |
-
libsndfile1 \
|
| 9 |
-
&& apt-get clean
|
| 10 |
|
| 11 |
# Set working directory
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
-
# Copy all
|
| 15 |
-
COPY .
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
|
| 19 |
|
| 20 |
-
# Install
|
|
|
|
| 21 |
RUN pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
|
| 22 |
|
| 23 |
-
# Set cache dir for Hugging Face models to avoid /.cache permission errors
|
| 24 |
-
ENV TRANSFORMERS_CACHE=/app/cache/huggingface
|
| 25 |
-
ENV HF_HOME=/app/cache/huggingface
|
| 26 |
-
|
| 27 |
# Expose port
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
-
#
|
| 31 |
CMD ["python", "app.py"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install OS dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y git ffmpeg libsndfile1 && apt-get clean
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
# Expose port
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# Run app
|
| 23 |
CMD ["python", "app.py"]
|