Sadiksmart0 commited on
Commit
5e64c0a
·
verified ·
1 Parent(s): 04fea66

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -3
Dockerfile CHANGED
@@ -1,4 +1,26 @@
1
- FROM ollama/ollama
2
 
3
- # Optional: Automatically pull the model on container start
4
- CMD ["ollama", "serve"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
 
3
+ # Install dependencies
4
+ RUN apt-get update && apt-get install -y curl && \
5
+ curl -fsSL https://ollama.ai/install.sh | sh && \
6
+ apt-get clean && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Create a user
9
+ RUN useradd user
10
+ USER user
11
+ ENV HOME=/home/user
12
+ WORKDIR $HOME/app
13
+
14
+ # Copy files
15
+ COPY --chown=user requirements.txt .
16
+ RUN pip install -r requirements.txt
17
+ COPY --chown=user . .
18
+ # Copy files
19
+ # Make the script executable
20
+ RUN chmod +x start.sh
21
+
22
+ # Expose the port
23
+ EXPOSE 7860
24
+
25
+ # Start the application
26
+ CMD ["./start.sh"]