KunalThakare279 commited on
Commit
398c82c
·
verified ·
1 Parent(s): 9dc35ed

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -12,8 +12,11 @@ COPY . .
12
  # Change ownership of the application files
13
  RUN chown -R appuser:appgroup /app
14
 
 
 
 
15
  # Switch to the non-root user
16
- USER root
17
 
18
  # Install Python dependencies
19
  RUN python -m pip install --no-cache-dir -r requirements.txt
@@ -21,9 +24,6 @@ RUN python -m pip install --no-cache-dir -r requirements.txt
21
  # Switch back to root to add commands that need root access
22
  USER root
23
 
24
- RUN mkdir -p /app/.cache/huggingface
25
- RUN chmod -R 777 /app
26
-
27
  RUN apt-get update && apt-get install -y git
28
 
29
  # Expose the port that the application listens on
 
12
  # Change ownership of the application files
13
  RUN chown -R appuser:appgroup /app
14
 
15
+ # Set environment variable to point to a cache directory inside /app
16
+ ENV HF_HOME=/app/.cache/huggingface
17
+
18
  # Switch to the non-root user
19
+ USER appuser
20
 
21
  # Install Python dependencies
22
  RUN python -m pip install --no-cache-dir -r requirements.txt
 
24
  # Switch back to root to add commands that need root access
25
  USER root
26
 
 
 
 
27
  RUN apt-get update && apt-get install -y git
28
 
29
  # Expose the port that the application listens on