# Local installation of CUDA toolkit

**URL:** https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463
**Category:** GPU
**Created:** [September 11, 2020, 3:05pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463 "2020-09-11T15:05:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![DanaGalizia](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@DanaGalizia](https://discourse.julialang.org/u/DanaGalizia)
#### Post date: [September 11, 2020, 3:05pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463/1 "2020-09-11T15:05:16Z")

</div>

Hi, I’m trying to add the Cuda.jl package using a local installation of the CUDA toolkit. In the installation guide, it says

> You might want to disallow use of artifacts, e.g., because an optimized CUDA installation is available for your system. You can do so by setting the environment variable `JULIA_CUDA_USE_BINARYBUILDER` to `false` when importing CUDA.jl.

I’m pretty new to Julia, so I’m not really sure how to implement these instructions. Specifically, exactly how does one set this environment variable when importing CUDA.jl?

Thanks in advance for any help!

---

<div class="post-metadata">

### Author: ![scimas](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@scimas](https://discourse.julialang.org/u/scimas)
#### Post date: [September 11, 2020, 3:46pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463/2 "2020-09-11T15:46:27Z")

</div>

Add that environment variable when launching julia like this:

```julia
JULIA_CUDA_USE_BINARYBUILDER=false julia

```

Or set the variable permanently for that session

```julia
export JULIA_CUDA_USE_BINARYBUILDER=false
julia

```

---

<div class="post-metadata">

### Author: ![DanaGalizia](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@DanaGalizia](https://discourse.julialang.org/u/DanaGalizia)
#### Post date: [September 11, 2020, 4:28pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463/3 "2020-09-11T16:28:17Z")

</div>

Hi, thanks for your response. I’m not able to get it to work, however. Where am I supposed to be running those lines of code from? For example, if I try the first one from Windows PowerShell, I get:

```julia
PS C:\> JULIA_CUDA_USE_BINARYBUILDER=false julia
JULIA_CUDA_USE_BINARYBUILDER=false : The term 'JULIA_CUDA_USE_BINARYBUILDER=false' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ JULIA_CUDA_USE_BINARYBUILDER=false julia
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (JULIA_CUDA_USE_BINARYBUILDER=false:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

```

Apologies again, I’m new to this!

---

<div class="post-metadata">

### Author: ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)
#### Post date: [September 11, 2020, 4:49pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463/5 "2020-09-11T16:49:04Z")

</div>

In a julia REPL you can type ENV; a dictionary will be printed with all the environment variables.  
If you want to add a new environment variable in the current Julia process type in REPL: `ENV["JULIA_CUDA_USE_BINARYBUILDER"] = false`

Otherwise you can simply go in Windows Environment variables window, add a new variable called JULIA\_CUDA\_USE\_BINARYBUILDER and put `false` in the value field.

Indeed there is a way to set this at Julia startup but I’m also struggling with it.

---

<div class="post-metadata">

### Author: ![scimas](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@scimas](https://discourse.julialang.org/u/scimas)
#### Post date: [September 11, 2020, 5:14pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463/6 "2020-09-11T17:14:22Z")

</div>

I haven’t used julia on windows. The instructions I mentioned work with bash, don’t know how to deal with powershell. But the method Iulian.Cioarca mentioned is better and should work on any platform.

---

<div class="post-metadata">

### Author: ![DanaGalizia](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@DanaGalizia](https://discourse.julialang.org/u/DanaGalizia)
#### Post date: [September 11, 2020, 5:49pm UTC](https://discourse.julialang.org/t/local-installation-of-cuda-toolkit/46463/7 "2020-09-11T17:49:50Z")

</div>

This worked, thanks very much!
