Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
@@ -8,15 +8,19 @@ RUN apt-get update && apt-get install -y \
|
|
8 |
curl \
|
9 |
software-properties-common \
|
10 |
git \
|
|
|
|
|
11 |
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
# Create cache directory with proper permissions
|
14 |
-
RUN mkdir -p /.cache/huggingface && \
|
15 |
-
chmod -R 777 /.cache
|
16 |
|
17 |
# Set environment variables
|
18 |
-
ENV TRANSFORMERS_CACHE
|
19 |
-
ENV HF_HOME
|
|
|
|
|
20 |
ENV TORCH_HOME=/.cache/torch
|
21 |
ENV XDG_CACHE_HOME=/.cache
|
22 |
|
@@ -24,7 +28,8 @@ ENV XDG_CACHE_HOME=/.cache
|
|
24 |
COPY requirements.txt .
|
25 |
|
26 |
# Install Python dependencies
|
27 |
-
RUN pip install --no-cache-dir
|
|
|
28 |
python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('jinaai/jina-embeddings-v3', trust_remote_code=True)"
|
29 |
|
30 |
# Copy the rest of the application
|
|
|
8 |
curl \
|
9 |
software-properties-common \
|
10 |
git \
|
11 |
+
ffmpeg \
|
12 |
+
libsndfile1 \
|
13 |
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
# Create cache directory with proper permissions
|
16 |
+
RUN mkdir -p /root/.cache/huggingface && \
|
17 |
+
chmod -R 777 /root/.cache
|
18 |
|
19 |
# Set environment variables
|
20 |
+
ENV TRANSFORMERS_CACHE=/root/.cache/huggingface
|
21 |
+
ENV HF_HOME=/root/.cache/huggingface
|
22 |
+
ENV PYTHONUNBUFFERED=1
|
23 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
24 |
ENV TORCH_HOME=/.cache/torch
|
25 |
ENV XDG_CACHE_HOME=/.cache
|
26 |
|
|
|
28 |
COPY requirements.txt .
|
29 |
|
30 |
# Install Python dependencies
|
31 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
32 |
+
pip install --no-cache-dir -r requirements.txt && \
|
33 |
python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('jinaai/jina-embeddings-v3', trust_remote_code=True)"
|
34 |
|
35 |
# Copy the rest of the application
|