Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
@@ -5,16 +5,19 @@ WORKDIR /app
|
|
5 |
# Install system packages
|
6 |
RUN apt-get update && apt-get install -y ffmpeg git wget && rm -rf /var/lib/apt/lists/*
|
7 |
|
8 |
-
# Set env
|
9 |
ENV XDG_CACHE_HOME=/app/.cache
|
10 |
|
11 |
-
#
|
|
|
|
|
|
|
12 |
RUN pip install --no-cache-dir --upgrade pip
|
13 |
|
14 |
-
# Copy
|
15 |
COPY . .
|
16 |
|
17 |
-
# Download Hugging Face custom interface
|
18 |
RUN mkdir -p src && wget -O src/custome_interface.py https://huggingface.co/Jzuluaga/accent-id-commonaccent_xlsr-en-english/resolve/main/custom_interface.py
|
19 |
|
20 |
# Install Python dependencies
|
@@ -23,5 +26,5 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
23 |
# Expose Streamlit port
|
24 |
EXPOSE 8501
|
25 |
|
26 |
-
# Run
|
27 |
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.enableCORS=false"]
|
|
|
5 |
# Install system packages
|
6 |
RUN apt-get update && apt-get install -y ffmpeg git wget && rm -rf /var/lib/apt/lists/*
|
7 |
|
8 |
+
# Set cache env (for Whisper and Hugging Face)
|
9 |
ENV XDG_CACHE_HOME=/app/.cache
|
10 |
|
11 |
+
# Create cache dirs with write permission
|
12 |
+
RUN mkdir -p /app/.cache/whisper && chmod -R 777 /app/.cache
|
13 |
+
|
14 |
+
# Upgrade pip
|
15 |
RUN pip install --no-cache-dir --upgrade pip
|
16 |
|
17 |
+
# Copy source code
|
18 |
COPY . .
|
19 |
|
20 |
+
# Download Hugging Face custom interface file
|
21 |
RUN mkdir -p src && wget -O src/custome_interface.py https://huggingface.co/Jzuluaga/accent-id-commonaccent_xlsr-en-english/resolve/main/custom_interface.py
|
22 |
|
23 |
# Install Python dependencies
|
|
|
26 |
# Expose Streamlit port
|
27 |
EXPOSE 8501
|
28 |
|
29 |
+
# Run Streamlit app
|
30 |
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.enableCORS=false"]
|