abanm commited on
Commit
2e30346
·
verified ·
1 Parent(s): 75f9474

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -5
Dockerfile CHANGED
@@ -25,10 +25,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
25
  # Set OLLAMA_HOME to a writable directory
26
  ENV OLLAMA_HOME=/ollama-data
27
 
28
- # Create the Ollama data directory with appropriate permissions
29
  RUN mkdir -p $OLLAMA_HOME && chmod 755 $OLLAMA_HOME
30
 
31
- # Install Ollama
32
  RUN curl -fsSL https://ollama.com/install.sh | bash
33
 
34
  # ----------------------------------------------------------
@@ -39,7 +37,6 @@ RUN useradd -m appuser
39
  # ----------------------------------------------------------
40
  # 5. Set Permissions for Ollama Directory
41
  # ----------------------------------------------------------
42
- # Ensure appuser has ownership of the Ollama directory
43
  RUN chown -R appuser:appuser $OLLAMA_HOME
44
 
45
  # ----------------------------------------------------------
@@ -50,7 +47,7 @@ WORKDIR /app
50
  # ----------------------------------------------------------
51
  # 7. Copy and Install Python Requirements
52
  # ----------------------------------------------------------
53
- COPY requirements.txt .
54
  RUN pip3 install --no-cache-dir -r requirements.txt
55
 
56
  # ----------------------------------------------------------
@@ -73,7 +70,7 @@ EXPOSE 7860
73
  RUN chown -R appuser:appuser /app
74
 
75
  # ----------------------------------------------------------
76
- # 11. Switch to Non-Root User for Running the Application
77
  # ----------------------------------------------------------
78
  USER appuser
79
 
 
25
  # Set OLLAMA_HOME to a writable directory
26
  ENV OLLAMA_HOME=/ollama-data
27
 
 
28
  RUN mkdir -p $OLLAMA_HOME && chmod 755 $OLLAMA_HOME
29
 
 
30
  RUN curl -fsSL https://ollama.com/install.sh | bash
31
 
32
  # ----------------------------------------------------------
 
37
  # ----------------------------------------------------------
38
  # 5. Set Permissions for Ollama Directory
39
  # ----------------------------------------------------------
 
40
  RUN chown -R appuser:appuser $OLLAMA_HOME
41
 
42
  # ----------------------------------------------------------
 
47
  # ----------------------------------------------------------
48
  # 7. Copy and Install Python Requirements
49
  # ----------------------------------------------------------
50
+ COPY requirements.txt .
51
  RUN pip3 install --no-cache-dir -r requirements.txt
52
 
53
  # ----------------------------------------------------------
 
70
  RUN chown -R appuser:appuser /app
71
 
72
  # ----------------------------------------------------------
73
+ # 11. Switch to Non-Root User
74
  # ----------------------------------------------------------
75
  USER appuser
76