Reorganize Docker build infrastructure for better maintainability

- Restructure from ollama37/ to docker/ with clear separation
- Separate builder and runtime images into dedicated directories
- Group environment scripts in builder/scripts/ subdirectory
- Add comprehensive root-level README.md (257 lines)
- Add .dockerignore files for optimized build contexts
- Enhance shell scripts with shebangs and documentation headers
- Update docker-compose.yml to build locally instead of pulling
- Add environment variables for GPU and host configuration
- Remove duplicate Dockerfile and confusing nested structure

New structure:
  docker/
  ├── README.md (comprehensive documentation)
  ├── docker-compose.yml (local build support)
  ├── builder/ (build environment: CUDA 11.4 + GCC 10 + Go 1.24)
  │   ├── Dockerfile
  │   ├── README.md
  │   ├── .dockerignore
  │   └── scripts/ (organized environment setup)
  └── runtime/ (production image)
      ├── Dockerfile
      ├── README.md
      └── .dockerignore

This reorganization eliminates confusion, removes duplication, and
provides a professional, maintainable structure for Tesla K80 builds.
This commit is contained in:
Shang Chieh Tseng
2025-10-28 14:47:39 +08:00
parent 736cbdf52a
commit 8dc4ca7ccc
11 changed files with 569 additions and 0 deletions

16
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
services:
ollama37:
build:
context: ./runtime
dockerfile: Dockerfile
image: ollama37:local
container_name: ollama37
ports:
- "11434:11434"
restart: unless-stopped
runtime: nvidia
volumes:
- ./volume:/root/.ollama
environment:
- CUDA_VISIBLE_DEVICES=all
- OLLAMA_HOST=0.0.0.0