mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	devops: make build dir an argument
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
		| @@ -1,5 +1,6 @@ | |||||||
| ARG GCC_VERSION=15.2.0 | ARG GCC_VERSION=15.2.0 | ||||||
| ARG DEBIAN_VERSION=12 | ARG DEBIAN_VERSION=12 | ||||||
|  | ARG BUILD_DIR=/app | ||||||
|  |  | ||||||
| FROM gcc:${GCC_VERSION} AS build | FROM gcc:${GCC_VERSION} AS build | ||||||
|  |  | ||||||
| @@ -12,11 +13,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | |||||||
|         libcurl4-openssl-dev libopenblas-openmp-dev && \ |         libcurl4-openssl-dev libopenblas-openmp-dev && \ | ||||||
|     rm -rf /var/lib/apt/lists/* |     rm -rf /var/lib/apt/lists/* | ||||||
|  |  | ||||||
| WORKDIR /app | WORKDIR ${BUILD_DIR} | ||||||
| COPY . . | COPY . . | ||||||
|  |  | ||||||
| RUN --mount=type=cache,target=/root/.ccache \ | RUN --mount=type=cache,target=/root/.ccache \ | ||||||
|     --mount=type=cache,target=/app/build \ |     --mount=type=cache,target=${BUILD_DIR}/build \ | ||||||
|     cmake -S . -B build -G Ninja \ |     cmake -S . -B build -G Ninja \ | ||||||
|         -DCMAKE_BUILD_TYPE=Release \ |         -DCMAKE_BUILD_TYPE=Release \ | ||||||
|         -DCMAKE_C_COMPILER_LAUNCHER=ccache \ |         -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||||||
| @@ -31,6 +32,7 @@ RUN --mount=type=cache,target=/root/.ccache \ | |||||||
|     cmake --install build --prefix /opt/llama.cpp |     cmake --install build --prefix /opt/llama.cpp | ||||||
|  |  | ||||||
| # TODO: DOUBLE CHECK ALL FILES ARE COPIED INTO COLLECTOR | # TODO: DOUBLE CHECK ALL FILES ARE COPIED INTO COLLECTOR | ||||||
|  | # TODO: Switch to COPY operation instead for caching | ||||||
| RUN cp *.py /opt/llama.cpp \ | RUN cp *.py /opt/llama.cpp \ | ||||||
|     && cp -r gguf-py /opt/llama.cpp \ |     && cp -r gguf-py /opt/llama.cpp \ | ||||||
|     && cp -r requirements /opt/llama.cpp \ |     && cp -r requirements /opt/llama.cpp \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aaron Teo
					Aaron Teo