generated from ahnazary/python-template-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (28 loc) · 892 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM ollama/ollama
WORKDIR /app
# Clear the base image entrypoint
ENTRYPOINT []
COPY Modelfile.txt Modelfile.txt
COPY ./run-ollama.sh run-ollama.sh
RUN chmod +x run-ollama.sh \
&& ./run-ollama.sh
RUN apt-get update && apt-get install -y \
coreutils \
python3-pip
# Install Python 3.10
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get install -y python3.10 python3.10-venv python3.10-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Ensure python3 points to python3.10
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
# Install python dependencies
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Copy the source code
COPY ai_planner/src src
EXPOSE 11434
EXPOSE 5050
CMD ollama serve & python3 src/app.py