ysif9 commited on
Commit
93437f7
·
verified ·
1 Parent(s): 65da834

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -21,6 +21,9 @@ ENV HOME=/app \
21
  STREAMLIT_DISABLE_TELEMETRY=1 \
22
  PYTHONUNBUFFERED=1 \
23
  PIP_NO_CACHE_DIR=1
 
 
 
24
 
25
  # Prepare writable directories
26
  RUN mkdir -p /app/.streamlit/cache \
@@ -35,11 +38,6 @@ RUN mkdir -p /app/.config /app/.cache \
35
  # Copy application code
36
  COPY src/ ./src/
37
 
38
- # Create a non-root user and give ownership of /app
39
- RUN useradd -m -u 1000 appuser \
40
- && chown -R appuser:appuser /app
41
- USER appuser
42
-
43
  # Networking and healthcheck
44
  EXPOSE 8501
45
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
 
21
  STREAMLIT_DISABLE_TELEMETRY=1 \
22
  PYTHONUNBUFFERED=1 \
23
  PIP_NO_CACHE_DIR=1
24
+ HF_HOME=/app/.cache/huggingface \
25
+ TRANSFORMERS_CACHE=/app/.cache/huggingface/transformers \
26
+ TORCH_HOME=/app/.cache/torch \
27
 
28
  # Prepare writable directories
29
  RUN mkdir -p /app/.streamlit/cache \
 
38
  # Copy application code
39
  COPY src/ ./src/
40
 
 
 
 
 
 
41
  # Networking and healthcheck
42
  EXPOSE 8501
43
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1