Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
@@ -7,10 +7,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
7 |
HF_HOME=/app/.cache \
|
8 |
TRANSFORMERS_VERBOSITY=error
|
9 |
|
10 |
-
# Set working directory
|
11 |
WORKDIR /app
|
12 |
-
|
13 |
-
# Create necessary folders
|
14 |
RUN mkdir -p /app/.cache /app/models/suno-bark /app/models/sentiment && \
|
15 |
chmod -R 777 /app/.cache /app/models
|
16 |
|
@@ -21,7 +19,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
21 |
|
22 |
# Copy requirements and install Python dependencies
|
23 |
COPY requirements.txt .
|
24 |
-
RUN pip install --no-cache-dir --root-user-action=ignore
|
|
|
|
|
25 |
|
26 |
# Download Bark TTS model
|
27 |
RUN python3 - <<EOF
|
@@ -50,11 +50,11 @@ except Exception as e:
|
|
50 |
exit(1)
|
51 |
EOF
|
52 |
|
53 |
-
# Copy application source code
|
54 |
-
COPY
|
55 |
|
56 |
-
# Expose port
|
57 |
EXPOSE 7860
|
58 |
|
59 |
-
#
|
60 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
7 |
HF_HOME=/app/.cache \
|
8 |
TRANSFORMERS_VERBOSITY=error
|
9 |
|
10 |
+
# Set working directory and create necessary folders
|
11 |
WORKDIR /app
|
|
|
|
|
12 |
RUN mkdir -p /app/.cache /app/models/suno-bark /app/models/sentiment && \
|
13 |
chmod -R 777 /app/.cache /app/models
|
14 |
|
|
|
19 |
|
20 |
# Copy requirements and install Python dependencies
|
21 |
COPY requirements.txt .
|
22 |
+
RUN pip install --no-cache-dir --root-user-action=ignore \
|
23 |
+
numpy<2.0 protobuf && \
|
24 |
+
pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
|
25 |
|
26 |
# Download Bark TTS model
|
27 |
RUN python3 - <<EOF
|
|
|
50 |
exit(1)
|
51 |
EOF
|
52 |
|
53 |
+
# Copy application source code
|
54 |
+
COPY app .
|
55 |
|
56 |
+
# Expose port for Hugging Face Space
|
57 |
EXPOSE 7860
|
58 |
|
59 |
+
# Launch app using Uvicorn
|
60 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|