Files
ollama37/docker/builder
Shang Chieh Tseng 8380ca93f8 Fix Docker build system: add library paths, GCC 10 runtime libs, and Go build flags
- Add LD_LIBRARY_PATH to CMake and build steps for GCC 10 libraries
- Copy GCC 10 runtime libraries (libstdc++.so.6, libgcc_s.so.1) to output
- Update runtime Dockerfile to use minimal CUDA runtime packages
- Add -buildvcs=false flag to Go build to avoid Git VCS errors
- Simplify runtime container to only include necessary CUDA libraries
- Fix library path configuration for proper runtime library loading
2025-11-09 00:05:12 +08:00
..

Ollama37 Builder Image

This directory contains the Dockerfile for building the ollama37-builder:latest image.

What's Inside

The builder image includes:

  • Base: nvidia/cuda:11.4.3-devel-rockylinux8
  • GCC 10: gcc-toolset-10 (required by CUDA 11.4)
  • CMake: System package
  • Go: System package

Building the Builder Image

The builder image is automatically built by the Makefile when you run make build for the first time.

To manually build the builder image:

cd /home/jack/Documents/ollama37/docker
make build-builder

Or using Docker directly:

cd /home/jack/Documents/ollama37/docker/builder
docker build -t ollama37-builder:latest .

Using the Builder Image

The Makefile handles this automatically, but for reference:

# Start builder container with GPU access
docker run --rm -d \
  --name ollama37-builder \
  --runtime=nvidia \
  --gpus all \
  ollama37-builder:latest \
  sleep infinity

# Use the container
docker exec -it ollama37-builder bash

Customization

If you need to modify the builder (e.g., change CUDA version, add packages):

  1. Edit Dockerfile in this directory
  2. Rebuild: make clean-builder build-builder
  3. Build your project: make build

Archived Builder

The archived/ subdirectory contains an older Dockerfile that built GCC and CMake from source (~80 minutes). The current version uses Rocky Linux system packages for much faster builds (~5 minutes).