Update Dockerfile
Browse files- Dockerfile +4 -7
Dockerfile
CHANGED
|
@@ -24,16 +24,13 @@ COPY requirements.txt .
|
|
| 24 |
RUN pip install --no-cache-dir --upgrade pip \
|
| 25 |
&& pip install --no-cache-dir -r requirements.txt
|
| 26 |
|
| 27 |
-
# Create cache directory and dummy embeddings file if needed
|
| 28 |
-
RUN mkdir -p /app/cache \
|
| 29 |
-
&& touch /app/embeddings_cache.joblib \
|
| 30 |
-
&& chmod 777 /app/embeddings_cache.joblib
|
| 31 |
-
|
| 32 |
# Copy application code
|
| 33 |
COPY . .
|
| 34 |
|
| 35 |
-
# Create necessary directories
|
| 36 |
-
RUN mkdir -p static/audio static/assets
|
|
|
|
|
|
|
| 37 |
|
| 38 |
# Expose port
|
| 39 |
EXPOSE 7860
|
|
|
|
| 24 |
RUN pip install --no-cache-dir --upgrade pip \
|
| 25 |
&& pip install --no-cache-dir -r requirements.txt
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# Copy application code
|
| 28 |
COPY . .
|
| 29 |
|
| 30 |
+
# Create necessary directories and initialize empty cache if needed
|
| 31 |
+
RUN mkdir -p static/audio static/assets \
|
| 32 |
+
&& python -c "import joblib; joblib.dump({}, 'embeddings_cache.joblib')" \
|
| 33 |
+
&& chmod 666 embeddings_cache.joblib
|
| 34 |
|
| 35 |
# Expose port
|
| 36 |
EXPOSE 7860
|