File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ USER "${USER_NAME}"
5252# && curl -LsSf https://hf.co/cli/install.sh | bash \
5353# && /tmp/scripts/build_llama_cpp_from_source.sh \
5454# && hf download "${HF_REPO}" --local-dir "${MODEL_DIRECTORY}" --token "${HF_API_TOKEN}"
55- RUN --mount=type=secret,id=HF_API_TOKEN \
55+ RUN --mount=type=secret,id=HF_API_TOKEN,env=HF_API_TOKEN \
5656 mkdir -p "${MODEL_DIRECTORY}" && chmod 777 "${MODEL_DIRECTORY}" \
5757 && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
5858 && brew install --force hf llama.cpp \
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ terminal-image:
4040notebook-image :
4141 @$(MAKE ) IMAGE=notebook --no-print-directory build-image
4242agentic-image :
43- @$(MAKE ) IMAGE=agentic --no-print-directory build-image
43+ @$(MAKE ) IMAGE=agentic DOCKER_BUILD_SECRETS= " --secret id=HF_API_TOKEN,env=HF_API_TOKEN " --no-print-directory build-image
4444#
4545# Push tasks
4646#
@@ -56,12 +56,13 @@ push-agentic:
5656# Parameterized tasks
5757#
5858DOCKERFILE ?= ./Dockerfile.${IMAGE}
59+ DOCKER_BUILD_SECRETS ?=
5960build-image :
60- @docker build \
61+ @HF_API_TOKEN= " $( HF_API_TOKEN ) " docker build \
6162 --no-cache \
6263 --build-arg VERSION=$(VERSION ) \
6364 --file ${DOCKERFILE} \
64- --secret id=HF_API_TOKEN \
65+ ${DOCKER_BUILD_SECRETS} \
6566 --tag ${REGISTRY} /${GITHUB_ACTOR} /${IMAGE} :$(VERSION ) \
6667 .
6768 @docker tag ${REGISTRY} /${GITHUB_ACTOR} /${IMAGE} :$(VERSION ) ${REGISTRY} /${GITHUB_ACTOR} /${IMAGE} :latest
You can’t perform that action at this time.
0 commit comments