Spaces:
Running
Running
Ashwin V. Mohanan
commited on
Commit
·
ae79add
1
Parent(s):
6042424
Ensure permissions
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -37,15 +37,16 @@ RUN useradd -m -u 1000 appuser
|
|
37 |
# Set working directory
|
38 |
WORKDIR /home/appuser/app
|
39 |
|
|
|
|
|
|
|
|
|
40 |
# Switch to non-root user
|
41 |
USER appuser
|
42 |
|
43 |
# Expose port for Gradio
|
44 |
EXPOSE 7860
|
45 |
|
46 |
-
# Ensure non-root user has write access to cache and tmp directories
|
47 |
-
RUN mkdir -p /home/appuser/.cache/transformers /home/appuser/tmp /home/appuser/.cache
|
48 |
-
|
49 |
# Install `uv`
|
50 |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
51 |
|
|
|
37 |
# Set working directory
|
38 |
WORKDIR /home/appuser/app
|
39 |
|
40 |
+
# Ensure non-root user has write access to cache and tmp directories
|
41 |
+
RUN mkdir -p /home/appuser/.cache/transformers /home/appuser/tmp /home/appuser/.cache \
|
42 |
+
&& chown -R appuser:appuser /home/appuser/.cache /home/appuser/tmp/ /home/appuser/app/
|
43 |
+
|
44 |
# Switch to non-root user
|
45 |
USER appuser
|
46 |
|
47 |
# Expose port for Gradio
|
48 |
EXPOSE 7860
|
49 |
|
|
|
|
|
|
|
50 |
# Install `uv`
|
51 |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
52 |
|