Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
@@ -1,19 +1,23 @@
|
|
1 |
-
FROM ollama/ollama:0.1.44
|
2 |
|
3 |
# Cài đặt các công cụ cần thiết: Python, pip, curl
|
4 |
RUN apt-get update && apt-get install -y python3 python3-pip curl
|
5 |
|
6 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
COPY requirements.txt .
|
8 |
RUN pip3 install -r requirements.txt
|
9 |
|
10 |
-
#
|
11 |
COPY . /app
|
12 |
-
WORKDIR /app
|
13 |
|
14 |
-
#
|
15 |
-
|
16 |
-
ENV OLLAMA_HOME=/app/ollama
|
17 |
|
18 |
# Start the application
|
19 |
ENTRYPOINT ["ollama", "serve"]
|
|
|
1 |
+
FROM docker.io/ollama/ollama:0.1.44@sha256:1174d6119998bb10f5af2437e7aeeb934726e37268f0d66f200f6cfd9fb20578
|
2 |
|
3 |
# Cài đặt các công cụ cần thiết: Python, pip, curl
|
4 |
RUN apt-get update && apt-get install -y python3 python3-pip curl
|
5 |
|
6 |
+
# Update package list and install dependencies
|
7 |
+
RUN apt-get update && apt-get install -y python3 python3-pip curl && \
|
8 |
+
useradd -m -r ollama && \
|
9 |
+
mkdir -p /app/ollama && \
|
10 |
+
chown -R ollama:ollama /app/ollama
|
11 |
+
|
12 |
+
# Copy requirements and install them
|
13 |
COPY requirements.txt .
|
14 |
RUN pip3 install -r requirements.txt
|
15 |
|
16 |
+
# Copy application code
|
17 |
COPY . /app
|
|
|
18 |
|
19 |
+
# Set working directory
|
20 |
+
WORKDIR /app
|
|
|
21 |
|
22 |
# Start the application
|
23 |
ENTRYPOINT ["ollama", "serve"]
|