# Force package to download (specific) lazy artifacts

**URL:** https://discourse.julialang.org/t/force-package-to-download-specific-lazy-artifacts/44300
**Category:** General Usage
**Created:** [August 5, 2020, 1:58am UTC](https://discourse.julialang.org/t/force-package-to-download-specific-lazy-artifacts/44300 "2020-08-05T01:58:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![torrance](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torrance/32/38990_2.png) [@torrance](https://discourse.julialang.org/u/torrance)
#### Post date: [August 5, 2020, 1:58am UTC](https://discourse.julialang.org/t/force-package-to-download-specific-lazy-artifacts/44300/1 "2020-08-05T01:58:21Z")

</div>

I’m building a read-only container for a Julia application. It relies on third-party packages, in particular CUDAjl, that have a bunch of lazy artifacts that are only downloaded based on the system type or CUDA version.

How can I force specific drivers to be downloaded in a less hacky way than I’m currently doing in the following:

```julia
ARTIFACTS=$JULIA_DEPOT_PATH/artifacts/CuArrays/*/Artifacts.toml
julia -E "using Pkg.Artifacts; ensure_artifacts_installed("CUDA10.1", $ARTIFACTS)"

```

In particular, the way I’m using to find the artifacts file has a strong code smell about it.

---

<div class="post-metadata">

### Author: ![pmilovanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pmilovanov/32/20965_2.png) [@pmilovanov](https://discourse.julialang.org/u/pmilovanov)
#### Post date: [February 25, 2021, 11:48pm UTC](https://discourse.julialang.org/t/force-package-to-download-specific-lazy-artifacts/44300/3 "2021-02-25T23:48:38Z")

</div>

This seems to work:

```julia
import Pkg, Artifacts, CUDA

toml = Artifacts.find_artifacts_toml(pathof(CUDA))

for a in ["CUDA110", "CUDNN_CUDA110", "CUTENSOR_CUDA110",
          "CUDA111", "CUDNN_CUDA111", "CUTENSOR_CUDA111"]
  Pkg.Artifacts.ensure_artifact_installed(a, toml)
end

```
