mirror of
https://github.com/dogkeeper886/ollama-k80-lab.git
synced 2025-12-09 23:37:07 +00:00
Docker builder for ollama37
This commit is contained in:
30
ollama37-builder/Dockerfile
Normal file
30
ollama37-builder/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM rockylinux/rockylinux:8
|
||||
|
||||
# Update OS and install cuda toolkit 11.4 and nvdia driver 470
|
||||
RUN dnf -y update\
|
||||
&& dnf -y install epel-release\
|
||||
&& dnf -y config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo\
|
||||
&& dnf -y module install nvidia-driver:470-dkms\
|
||||
&& dnf -y install cuda-11-4
|
||||
|
||||
# Post install, setup path
|
||||
COPY cuda-11.4.sh /etc/profile.d/cuda-11.4.sh
|
||||
|
||||
# Install gcc 10
|
||||
RUN dnf -y install wget unzip lbzip2\
|
||||
&& dnf -y groupinstall "Development Tools"\
|
||||
&& cd /usr/local/src\
|
||||
&& wget https://github.com/gcc-mirror/gcc/archive/refs/heads/releases/gcc-10.zip\
|
||||
&& unzip gcc-10.zip\
|
||||
&& cd gcc-releases-gcc-10\
|
||||
&& contrib/download_prerequisites\
|
||||
&& mkdir /usr/local/gcc-10\
|
||||
&& cd /usr/local/gcc-10\
|
||||
&& /usr/local/src/gcc-releases-gcc-10/configure --disable-multilib\
|
||||
&& make -j ${nproc}\
|
||||
&& make install
|
||||
|
||||
# Post install, setup path
|
||||
COPY gcc-10.sh /etc/profile.d/gcc-10.sh
|
||||
COPY gcc-10.sh /etc/ld.so.conf.d/gcc-10.sh
|
||||
|
||||
2
ollama37-builder/cuda-11.4.sh
Normal file
2
ollama37-builder/cuda-11.4.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
export PATH=/usr/local/cuda-11.4/bin${PATH:+:${PATH}}
|
||||
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||
1
ollama37-builder/gcc-10.sh
Normal file
1
ollama37-builder/gcc-10.sh
Normal file
@@ -0,0 +1 @@
|
||||
export LD_LIBRARY_PATH=/usr/local/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||
Reference in New Issue
Block a user