melissalau commited on
Commit
30a6991
·
1 Parent(s): 37e9db0

updated dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -4
Dockerfile CHANGED
@@ -5,15 +5,27 @@ FROM python:3.13.5-slim
5
  WORKDIR /app
6
 
7
  # Install system dependencies
8
- RUN apt-get update && apt-get install -y \
 
 
9
  build-essential \
10
  curl \
11
  git \
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # --- Add Ollama Installation ---
15
- # Download and install Ollama
16
- RUN curl -fsSL https://ollama.com/install.sh | sh
 
 
 
 
 
 
 
 
 
17
 
18
  # Copy your application files
19
  COPY requirements.txt ./
 
5
  WORKDIR /app
6
 
7
  # Install system dependencies
8
+ # DEBIAN_FRONTEND is set to noninteractive to prevent prompts
9
+ ENV DEBIAN_FRONTEND=noninteractive
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
  build-essential \
12
  curl \
13
  git \
14
+ ca-certificates \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # --- Manual Ollama Installation ---
18
+ # This is the new, robust method.
19
+ # Download the latest Linux binary from Ollama's GitHub releases
20
+ # The URL below is a generic way to get the latest release
21
+ RUN curl -L https://github.com/ollama/ollama/releases/latest/download/ollama-linux-amd64.tgz \
22
+ -o /tmp/ollama-linux-amd64.tgz
23
+
24
+ # Extract the tarball and place the binary directly in /usr/local/bin/
25
+ RUN tar -xzf /tmp/ollama-linux-amd64.tgz -C /usr/local/bin/
26
+
27
+ # Remove the temporary file
28
+ RUN rm /tmp/ollama-linux-amd64.tgz
29
 
30
  # Copy your application files
31
  COPY requirements.txt ./