Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -3
Dockerfile
CHANGED
@@ -10,8 +10,13 @@ WORKDIR /app
|
|
10 |
# Install dependencies
|
11 |
RUN pip install -r requirements.txt
|
12 |
|
13 |
-
# Create the cache directory
|
14 |
-
RUN mkdir -p /app/cache/huggingface/hub
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
# Start the app
|
17 |
-
CMD ["python", "app.py"]
|
|
|
10 |
# Install dependencies
|
11 |
RUN pip install -r requirements.txt
|
12 |
|
13 |
+
# Create the cache directory and set permissions
|
14 |
+
RUN mkdir -p /app/cache/huggingface/hub && \
|
15 |
+
chmod -R 777 /app/cache
|
16 |
+
|
17 |
+
# Create a non-root user and switch to it
|
18 |
+
RUN useradd -m appuser
|
19 |
+
USER appuser
|
20 |
|
21 |
# Start the app
|
22 |
+
CMD ["python", "app.py"]
|