Some checks are pending
Copilot Setup Steps / copilot-setup-steps (push) Waiting to run
Check Pre-Tokenizer Hashes / pre-tokenizer-hashes (push) Waiting to run
Python check requirements.txt / check-requirements (push) Waiting to run
Python Type-Check / python type-check (push) Waiting to run
Update Operations Documentation / update-ops-docs (push) Waiting to run
22 lines
505 B
CMake
22 lines
505 B
CMake
get_filename_component(DEST_DIR "${DEST}" DIRECTORY)
|
|
file(MAKE_DIRECTORY "${DEST_DIR}")
|
|
|
|
if(NOT EXISTS "${DEST}")
|
|
message(STATUS "Downloading ${NAME} from ggml-org/models...")
|
|
endif()
|
|
|
|
file(DOWNLOAD
|
|
"https://huggingface.co/ggml-org/models/resolve/main/${NAME}?download=true"
|
|
"${DEST}"
|
|
TLS_VERIFY ON
|
|
EXPECTED_HASH ${HASH}
|
|
STATUS status
|
|
)
|
|
|
|
list(GET status 0 code)
|
|
|
|
if(NOT code EQUAL 0)
|
|
list(GET status 1 msg)
|
|
message(FATAL_ERROR "Failed to download ${NAME}: ${msg}")
|
|
endif()
|