# Development with Docker and CUDA

**URL:** https://discourse.julialang.org/t/development-with-docker-and-cuda/123884
**Category:** General Usage
**Tags:** cuda, docker
**Created:** [December 16, 2024, 2:03pm UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884 "2024-12-16T14:03:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hilario](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@hilario](https://discourse.julialang.org/u/hilario)
#### Post date: [December 16, 2024, 2:03pm UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884/1 "2024-12-16T14:03:23Z")

</div>

Hi. I am developing code for my research and I’d like to make it run in a machine in which I don’t have permission to install Julia. I am not developing any “app”, I just want to be able to run my code, do my tests, expand and improve on the things that are still missing, and at the end generate numerical results to put in an article.

I have been thinking of using Docker, but I’m a newbie in both Julia and Docker, so I’d like some advice on how to go about this and what is considered good practice in this case.

Should I clone my project’s repository inside the container? Or should I let the container communicate with the host? Should I create the image with the packages listed in the .toml files? How would you go about this?

I’ll also need to parallelize things in CUDA. I don’t know if this makes things more complicated or if it’s the same as running parallelized code at host.

My knowledge of Docker is very faulty, and it seems that a lot of the tutorials on the web are for a different type of use than mine. I appreciate any help you guys can offer, as I feel quite lost here.

---

<div class="post-metadata">

### Author: ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)
#### Post date: [December 16, 2024, 2:08pm UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884/2 "2024-12-16T14:08:23Z")

</div>

> [@hilario](#):
>
> I’d like to make it run in a machine in which I don’t have permission to install Julia

`juliaup` installs in your home folder, without requiring additional permissions.

> [@hilario](#):
>
> I’ll also need to parallelize things in CUDA. I don’t know if this makes things more complicated or if it’s the same as running parallelized code at host.

CUDA.jl similarly installs the CUDA toolkit in user-writable locations. You do still need the NVIDIA driver to be installed by a system administrator, though.

---

<div class="post-metadata">

### Author: ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)
#### Post date: [December 16, 2024, 5:24pm UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884/3 "2024-12-16T17:24:34Z")

</div>

By the way, @maleadt do you have any docker file template? [GitHub - JuliaGPU/julia-ngc](https://github.com/JuliaGPU/julia-ngc) doesn’t seem to be updated with the latest version of Julia & CUDA.jl

---

<div class="post-metadata">

### Author: ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)
#### Post date: [December 16, 2024, 7:30pm UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884/4 "2024-12-16T19:30:26Z")

</div>

I do not have an up to date template, although it’s probably not too much work to update the `ngc` one for your needs.

---

<div class="post-metadata">

### Author: ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)
#### Post date: [December 17, 2024, 4:54am UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884/5 "2024-12-17T04:54:09Z")

</div>

I updated the dependency and it seems to still work fine.

@hilario You may give it a try [julia-ngc versions · findmyway · GitHub](https://github.com/findmyway/julia-ngc/pkgs/container/julia-ngc/323950278?tag=1.11)

I also made a PR [Update to Julia@v1.11 & CUDA.jl@v5.5.2 by findmyway · Pull Request #82 · JuliaGPU/julia-ngc · GitHub](https://github.com/JuliaGPU/julia-ngc/pull/82)

> [@hilario](#):
>
> I have been thinking of using Docker, but I’m a newbie in both Julia and Docker, so I’d like some advice on how to go about this and what is considered good practice in this case.

I’d strongly recommend you to start with the `juliaup` approach @maleadt mentioned earlier. Things are much more complicated than you thought if you are new to both Docker (with GPU) and Julia.

---

<div class="post-metadata">

### Author: ![hilario](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@hilario](https://discourse.julialang.org/u/hilario)
#### Post date: [December 17, 2024, 11:23am UTC](https://discourse.julialang.org/t/development-with-docker-and-cuda/123884/6 "2024-12-17T11:23:49Z")

</div>

Hi, thank you both @maleadt @findmyway for the help. I’m gonna try the approach you recommended!
