Spaces:
Sleeping
Sleeping
Sofia Casadei
commited on
Commit
Β·
1452d5e
1
Parent(s):
5ef2360
up
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -31,13 +31,17 @@ WORKDIR /app
|
|
31 |
# Set home to user's home directory
|
32 |
ENV HOME=/home/user \
|
33 |
PATH=/home/user/.local/bin:$PATH \
|
34 |
-
HF_HOME=/home/user/.cache/huggingface
|
|
|
|
|
|
|
|
|
35 |
|
36 |
# Copy requirements first for caching
|
37 |
COPY --chown=user requirements.txt .
|
38 |
|
39 |
# Install Python packages with uv caching
|
40 |
-
RUN --mount=type=cache,target
|
41 |
/uv pip install -r requirements.txt
|
42 |
|
43 |
# Copy application code
|
|
|
31 |
# Set home to user's home directory
|
32 |
ENV HOME=/home/user \
|
33 |
PATH=/home/user/.local/bin:$PATH \
|
34 |
+
HF_HOME=/home/user/.cache/huggingface \
|
35 |
+
UV_CACHE_DIR=/app/.uv-cache
|
36 |
+
|
37 |
+
# Create cache directory with proper permissions
|
38 |
+
RUN mkdir -p $UV_CACHE_DIR && chown -R user:user $UV_CACHE_DIR
|
39 |
|
40 |
# Copy requirements first for caching
|
41 |
COPY --chown=user requirements.txt .
|
42 |
|
43 |
# Install Python packages with uv caching
|
44 |
+
RUN --mount=type=cache,target=$UV_CACHE_DIR \
|
45 |
/uv pip install -r requirements.txt
|
46 |
|
47 |
# Copy application code
|