awinml commited on
Commit
2b956f2
·
verified ·
1 Parent(s): 982a788

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official lightweight Linux distribution as a base
2
+ FROM ubuntu:22.04
3
+
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Update and install essential dependencies
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ curl \
10
+ wget \
11
+ git \
12
+ ca-certificates \
13
+ build-essential \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Install Ollama
17
+ RUN curl -fsSL https://ollama.com/install.sh | sh
18
+
19
+ # Set up a non-root user for better security and permissions
20
+ RUN useradd -m -u 1000 user
21
+ USER user
22
+
23
+ # Set the working directory
24
+ WORKDIR /home/user/app
25
+
26
+ # Expose the port the app will use (default for Ollama is 11434)
27
+ EXPOSE 11434
28
+
29
+ # Command to pull the model and serve it
30
+ CMD ["ollama", "pull", "nomic-embed-text"]