ka1kuk commited on
Commit
0beb7d4
·
verified ·
1 Parent(s): 2dfbacf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -24
Dockerfile CHANGED
@@ -1,29 +1,15 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
 
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"]
 
1
+ # Builder stage
2
+ FROM ubuntu:latest
3
 
4
+ RUN apt update && apt install curl -y
 
5
 
6
+ RUN curl https://ollama.ai/install.sh | sh
 
 
 
7
 
8
+ # Create the directory and give appropriate permissions
9
+ RUN mkdir -p /.ollama && chmod 777 /.ollama
10
 
11
+ # Command to run the application
12
+ CMD ollama serve
13
 
14
+ # Expose the server port
15
+ EXPOSE 7860