Akash297 commited on
Commit
77f772e
·
verified ·
1 Parent(s): 75b1163

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y curl && \
9
  curl -fsSL https://ollama.com/install.sh | sh && \
10
  apt-get clean && rm -rf /var/lib/apt/lists/*
11
 
12
- # Ensure Ollama is in the $PATH (in case it's not set by the install script)
13
  ENV PATH="/root/.local/bin:$PATH"
14
 
15
  # Copy the application files
@@ -18,8 +18,12 @@ COPY . /app
18
  # Install Python dependencies
19
  RUN pip install --no-cache-dir flask gunicorn
20
 
 
 
 
 
21
  # Expose the required port
22
  EXPOSE 7860
23
 
24
- # Start Ollama and the Flask app (ensure Ollama is ready before starting Flask)
25
- CMD bash -c "ollama pull llama3.2 && ollama serve && gunicorn -w 2 -b 0.0.0.0:7860 app.dip:app"
 
9
  curl -fsSL https://ollama.com/install.sh | sh && \
10
  apt-get clean && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Ensure Ollama is in the $PATH
13
  ENV PATH="/root/.local/bin:$PATH"
14
 
15
  # Copy the application files
 
18
  # Install Python dependencies
19
  RUN pip install --no-cache-dir flask gunicorn
20
 
21
+ # Add start script
22
+ COPY start.sh /app/start.sh
23
+ RUN chmod +x /app/start.sh
24
+
25
  # Expose the required port
26
  EXPOSE 7860
27
 
28
+ # Use the start script to launch the app
29
+ CMD ["/app/start.sh"]