Spaces:
Sleeping
Sleeping
Fix directory permissions in Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -23,6 +23,10 @@ RUN apt-get update && apt-get install -y \
|
|
23 |
&& apt-get install -y nodejs \
|
24 |
&& rm -rf /var/lib/apt/lists/*
|
25 |
|
|
|
|
|
|
|
|
|
26 |
# Create a user with ID 1000 (required for Hugging Face Spaces)
|
27 |
RUN useradd -m -u 1000 user
|
28 |
USER user
|
@@ -30,9 +34,6 @@ ENV HOME=/home/user \
|
|
30 |
PATH=/home/user/.local/bin:$PATH \
|
31 |
PYTHONPATH=/app
|
32 |
|
33 |
-
# Create necessary directories
|
34 |
-
RUN mkdir -p ./figures ./pdfs ./src/processed_markdown
|
35 |
-
|
36 |
# Copy and install Python requirements
|
37 |
COPY --chown=user requirements.txt .
|
38 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
23 |
&& apt-get install -y nodejs \
|
24 |
&& rm -rf /var/lib/apt/lists/*
|
25 |
|
26 |
+
# Create necessary directories and set permissions
|
27 |
+
RUN mkdir -p ./figures ./pdfs ./src/processed_markdown \
|
28 |
+
&& chown -R 1000:1000 /app
|
29 |
+
|
30 |
# Create a user with ID 1000 (required for Hugging Face Spaces)
|
31 |
RUN useradd -m -u 1000 user
|
32 |
USER user
|
|
|
34 |
PATH=/home/user/.local/bin:$PATH \
|
35 |
PYTHONPATH=/app
|
36 |
|
|
|
|
|
|
|
37 |
# Copy and install Python requirements
|
38 |
COPY --chown=user requirements.txt .
|
39 |
RUN pip install --no-cache-dir -r requirements.txt
|