Spaces:
Sleeping
Sleeping
Dockerfile
Browse files- Dockerfile +2 -5
Dockerfile
CHANGED
|
@@ -22,14 +22,11 @@ COPY requirements.txt /code/requirements.txt
|
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip
|
| 23 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 24 |
|
| 25 |
-
# Download models at build time to avoid runtime delays
|
| 26 |
-
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
|
| 27 |
-
|
| 28 |
# Copy the application code
|
| 29 |
COPY . /code
|
| 30 |
|
| 31 |
-
# Create cache directory
|
| 32 |
-
RUN mkdir -p /code/cache
|
| 33 |
|
| 34 |
# Expose port 7860 for Hugging Face Spaces
|
| 35 |
EXPOSE 7860
|
|
|
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip
|
| 23 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
# Copy the application code
|
| 26 |
COPY . /code
|
| 27 |
|
| 28 |
+
# Create cache directory and set permissions
|
| 29 |
+
RUN mkdir -p /code/cache && chown -R 1000:1000 /code/cache
|
| 30 |
|
| 31 |
# Expose port 7860 for Hugging Face Spaces
|
| 32 |
EXPOSE 7860
|