ka1kuk commited on
Commit
2dfbacf
·
verified ·
1 Parent(s): 745face

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -15
Dockerfile CHANGED
@@ -4,25 +4,26 @@ FROM python:3.9-slim
4
  # Set the working directory in the container
5
  WORKDIR /usr/src/app
6
 
7
- COPY ./requirements.txt /code/requirements.txt
 
 
 
8
 
9
- COPY . .
10
-
11
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
 
13
- # Install curl
14
- RUN apt-get update && \
15
- apt-get install -y curl && \
16
- rm -rf /var/lib/apt/lists/*
17
 
18
- # Download and execute the installation script
19
- RUN curl -fsSL https://ollama.com/install.sh | sh
20
 
21
- # Copy the local directory contents into the container at /usr/src/app
22
  COPY . .
23
 
24
- # Make sure main.py is executable
25
- RUN chmod +x main.py
 
26
 
27
- # Run main.py when the container launches
28
- CMD ["python", "./main.py"]
 
4
  # Set the working directory in the container
5
  WORKDIR /usr/src/app
6
 
7
+ # Install curl and any other dependencies you might need
8
+ RUN apt-get update && apt-get install -y \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Run the install script from the web
13
+ RUN curl -fsSL https://ollama.com/install.sh | sh
 
14
 
15
+ # Copy the local requirements file to the container
16
+ COPY requirements.txt ./
 
 
17
 
18
+ # Install any needed packages specified in requirements.txt
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Copy the rest of the application's source code from your host to your image filesystem.
22
  COPY . .
23
 
24
+ # Run ollama serve (adjust if the command is different or requires additional flags)
25
+ # Note: If "ollama serve" is meant to run continuously, consider using it under CMD or ENTRYPOINT as appropriate.
26
+ RUN ollama serve
27
 
28
+ # Command to run the Python script
29
+ CMD ["python", "./main.py"]