Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -46
Dockerfile
CHANGED
@@ -1,48 +1,11 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
# Update packages and install curl and gnupg
|
5 |
-
RUN apt-get update && apt-get install -y \
|
6 |
-
curl \
|
7 |
-
gnupg
|
8 |
-
|
9 |
-
# Add NVIDIA package repositories
|
10 |
-
RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
11 |
-
&& 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
|
12 |
-
|
13 |
-
# Install NVIDIA container toolkit (Check for any updated methods or URLs for Ubuntu jammy)
|
14 |
-
RUN apt-get update && apt-get install -y nvidia-container-toolkit || true
|
15 |
-
|
16 |
-
# Install application
|
17 |
-
#RUN curl https://ollama.ai/install.sh | sh
|
18 |
-
RUN curl -fsSL https://ollama.com/install.sh | sh
|
19 |
-
# Below is to fix embedding bug as per
|
20 |
-
# 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
|
21 |
-
|
22 |
-
|
23 |
-
# Create the directory and give appropriate permissions
|
24 |
-
RUN mkdir /.ollama
|
25 |
-
RUN chmod 777 /.ollama
|
26 |
-
|
27 |
-
|
28 |
-
#COPY id_ed25519 /.ollama
|
29 |
-
|
30 |
-
WORKDIR /.ollama
|
31 |
-
|
32 |
-
|
33 |
-
#
|
34 |
-
CMD ollama serve
|
35 |
-
|
36 |
-
# Copy the entry point script
|
37 |
-
#COPY entrypoint.sh /entrypoint.sh
|
38 |
-
#RUN chmod +x /entrypoint.sh
|
39 |
-
|
40 |
-
# Set the entry point script as the default command
|
41 |
-
#ENTRYPOINT ["/entrypoint.sh"]
|
42 |
-
#CMD ["ollama", "serve"]
|
43 |
-
|
44 |
-
# Set the model as an environment variable (this can be overridden)
|
45 |
-
#ENV model=${model}
|
46 |
-
|
47 |
-
# Expose the server port
|
48 |
EXPOSE 7860
|
|
|
1 |
+
FROM --platform=linux/arm64 nvidia/cuda:$CUDA_VERSION-devel-rockylinux8 AS cuda-build-arm64
|
2 |
+
ARG CMAKE_VERSION
|
3 |
+
COPY ./scripts/rh_linux_deps.sh /
|
4 |
+
RUN CMAKE_VERSION=${CMAKE_VERSION} sh /rh_linux_deps.sh
|
5 |
+
ENV PATH /opt/rh/gcc-toolset-10/root/usr/bin:$PATH
|
6 |
+
COPY --from=llm-code / /go/src/github.com/ollama/ollama/
|
7 |
+
WORKDIR /go/src/github.com/ollama/ollama/llm/generate
|
8 |
+
ARG CGO_CFLAGS
|
9 |
+
RUN OLLAMA_SKIP_CPU_GENERATE=1 sh gen_linux.sh
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
EXPOSE 7860
|