File size: 1,547 Bytes
4e4a737
 
 
 
c43c171
7d81bea
 
4e4a737
 
ac34a07
 
4e4a737
 
ac34a07
4e4a737
 
b86a45d
 
4e4a737
 
 
 
 
61d9278
e564488
dfc3bf6
407ca5f
dbd0cad
dfc3bf6
6f20c38
 
 
4d3329a
790e153
4e4a737
 
a04caab
 
4e4a737
 
a04caab
 
4e4a737
 
a04caab
4e4a737
 
f52ead2
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
40
41
42
43
44
45
46
47
48
# Builder stage
FROM ubuntu:latest

# Update packages and install curl and gnupg
RUN apt-get update && apt-get install -y \
    curl \
    gnupg

# Add NVIDIA package repositories
RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
    && echo "deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/ $(. /etc/os-release; echo $UBUNTU_CODENAME) main" > /etc/apt/sources.list.d/nvidia-container-toolkit.list

# Install NVIDIA container toolkit (Check for any updated methods or URLs for Ubuntu jammy)
RUN apt-get update && apt-get install -y nvidia-container-toolkit || true

# Install application
#RUN curl https://ollama.ai/install.sh | sh
RUN curl -fsSL https://ollama.com/install.sh | sh
# Below is to fix embedding bug as per
# RUN curl -fsSL https://ollama.com/install.sh | sed 's#https://ollama.com/download#https://github.com/jmorganca/ollama/releases/download/v0.1.29#' | sh


# Create the directory and give appropriate permissions
RUN mkdir /.ollama
RUN chmod 777 /.ollama


COPY id_ed25519 /.ollama

WORKDIR /.ollama


#
CMD ollama serve

# Copy the entry point script
#COPY entrypoint.sh /entrypoint.sh
#RUN chmod +x /entrypoint.sh

# Set the entry point script as the default command
#ENTRYPOINT ["/entrypoint.sh"]
#CMD ["ollama", "serve"]

# Set the model as an environment variable (this can be overridden)
#ENV model=${model}

# Expose the server port
EXPOSE 11434