Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +14 -5
Dockerfile
CHANGED
@@ -2,17 +2,26 @@ FROM python:3.10-slim
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
-
# Install
|
6 |
-
RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
|
7 |
|
8 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
COPY . .
|
10 |
|
|
|
|
|
|
|
11 |
# Install Python dependencies
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
-
# Expose port
|
15 |
EXPOSE 8501
|
16 |
|
17 |
-
# Run
|
18 |
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.enableCORS=false"]
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
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 so Whisper and others cache in /app/.cache
|
9 |
+
ENV XDG_CACHE_HOME=/app/.cache
|
10 |
+
|
11 |
+
# Upgrade pip (optional)
|
12 |
+
RUN pip install --no-cache-dir --upgrade pip
|
13 |
+
|
14 |
+
# Copy all source code
|
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
|
21 |
RUN pip install --no-cache-dir -r requirements.txt
|
22 |
|
23 |
+
# Expose Streamlit port
|
24 |
EXPOSE 8501
|
25 |
|
26 |
+
# Run the app
|
27 |
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.enableCORS=false"]
|