Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +17 -6
Dockerfile
CHANGED
@@ -4,18 +4,29 @@ FROM python:3.10-slim
|
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Install OS-level dependencies
|
8 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
9 |
|
10 |
-
# Copy
|
11 |
COPY requirements.txt ./
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
# Copy the rest of your project files
|
15 |
COPY . .
|
16 |
|
17 |
-
# Expose Streamlit
|
18 |
-
EXPOSE
|
19 |
|
20 |
-
#
|
21 |
-
CMD ["streamlit", "run", "src/app.py", "--server.port=
|
|
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Prevent Numba caching issues with Librosa
|
8 |
+
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
|
9 |
+
# OR disable JIT completely (uncomment if needed)
|
10 |
+
# ENV NUMBA_DISABLE_JIT=1
|
11 |
+
|
12 |
+
# Create writable cache dir for Numba
|
13 |
+
RUN mkdir -p /tmp/numba_cache
|
14 |
+
|
15 |
# Install OS-level dependencies
|
16 |
+
RUN apt-get update && apt-get install -y \
|
17 |
+
ffmpeg \
|
18 |
+
git \
|
19 |
+
&& rm -rf /var/lib/apt/lists/*
|
20 |
|
21 |
+
# Copy requirements and install Python packages
|
22 |
COPY requirements.txt ./
|
23 |
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
|
25 |
# Copy the rest of your project files
|
26 |
COPY . .
|
27 |
|
28 |
+
# Expose the correct port for Streamlit on Hugging Face Spaces
|
29 |
+
EXPOSE 7860
|
30 |
|
31 |
+
# Launch Streamlit app (Hugging Face expects port 7860)
|
32 |
+
CMD ["streamlit", "run", "src/app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|