Chittrarasu commited on
Commit
d834c46
·
1 Parent(s): 360f4e6
Files changed (1) hide show
  1. Dockerfile +8 -0
Dockerfile CHANGED
@@ -11,9 +11,17 @@ COPY requirements.txt /app/
11
  # Create a writable cache directory for Hugging Face
12
  ENV HF_HOME=/app/hf_cache
13
  RUN mkdir -p /app/hf_cache
 
 
 
 
14
  # Install dependencies
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
 
 
 
 
17
  # Expose the Streamlit port
18
  EXPOSE 7860
19
 
 
11
  # Create a writable cache directory for Hugging Face
12
  ENV HF_HOME=/app/hf_cache
13
  RUN mkdir -p /app/hf_cache
14
+
15
+ # Set permissions for the cache directory
16
+ RUN chmod -R 777 /app/hf_cache
17
+
18
  # Install dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Create a non-root user and switch to it
22
+ RUN useradd -m appuser
23
+ USER appuser
24
+
25
  # Expose the Streamlit port
26
  EXPOSE 7860
27