Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +6 -16
Dockerfile
CHANGED
|
@@ -1,29 +1,19 @@
|
|
| 1 |
-
# Use an official lightweight Ubuntu base image
|
| 2 |
FROM ubuntu:22.04
|
| 3 |
|
| 4 |
-
# Set environment variables
|
| 5 |
-
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
-
ENV OLLAMA_HOME=/home/user/.ollama
|
| 7 |
-
|
| 8 |
-
# Create a non-root user to avoid permission issues
|
| 9 |
-
RUN useradd -m -s /bin/bash user
|
| 10 |
-
|
| 11 |
# Install dependencies
|
| 12 |
-
RUN apt update && apt install -y
|
| 13 |
-
curl git && \
|
| 14 |
-
rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
# Install Ollama
|
| 17 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
RUN
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
|
| 25 |
# Expose Ollama API port
|
| 26 |
EXPOSE 11434
|
| 27 |
|
| 28 |
-
#
|
| 29 |
CMD ["ollama", "serve"]
|
|
|
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
# Install dependencies
|
| 4 |
+
RUN apt update && apt install -y curl git python3 python3-pip
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Install Ollama
|
| 7 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 8 |
|
| 9 |
+
# Pull the specified Llama 3.2 model
|
| 10 |
+
RUN ollama pull llama3.2:3b-instruct-fp16
|
| 11 |
|
| 12 |
+
# Install Python dependencies
|
| 13 |
+
RUN pip install langchain langchain_ollama
|
| 14 |
|
| 15 |
# Expose Ollama API port
|
| 16 |
EXPOSE 11434
|
| 17 |
|
| 18 |
+
# Run Ollama on start
|
| 19 |
CMD ["ollama", "serve"]
|