# How does 3Dslicer compile offline locally

**URL:** https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849
**Category:** Development
**Created:** [October 23, 2022, 1:02pm UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849 "2022-10-23T13:02:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lhf](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lhf](https://discourse.slicer.org/u/lhf)
#### Post date: [October 23, 2022, 1:02pm UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/1 "2022-10-23T13:02:13Z")

</div>

Operating system:  
Slicer version:  
Expected behavior:  
Actual behavior:

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [October 23, 2022, 1:03pm UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/2 "2022-10-23T13:03:50Z")

</div>

See build instructions [here](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/index.html).

---

<div class="post-metadata">

### Author: ![lhf](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lhf](https://discourse.slicer.org/u/lhf)
#### Post date: [October 24, 2022, 2:24am UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/3 "2022-10-24T02:24:50Z")

</div>

If I download all of 3DSLICER’s libraries locally, can I compile them on my computer without the network?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [October 24, 2022, 2:39am UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/4 "2022-10-24T02:39:53Z")

</div>

Slicer need to download dozens of additional libraries. You can download all the packages, github repositories, etc. manually and configure the build to use those. For example, it should be possible to replace each reference to a `github.com/...` git repository by a local folder; set up pip to install packages from already downloaded files, etc.

You may also just build Slicer once to automatically download all dependencies, inspect them, and after that build again from those sources without network connection.

What is the reason for needing a build without network connection?

---

<div class="post-metadata">

### Author: ![lhf](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lhf](https://discourse.slicer.org/u/lhf)
#### Post date: [October 24, 2022, 2:49am UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/5 "2022-10-24T02:49:24Z")

</div>

thank,Local compilation does not require downloading the corresponding library from the Internet, which improves the speed of compilation.

---

<div class="post-metadata">

### Author: ![lhf](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lhf](https://discourse.slicer.org/u/lhf)
#### Post date: [October 24, 2022, 2:53am UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/6 "2022-10-24T02:53:44Z")

</div>

If I download all of Slicer’s dependent libraries, how do I configure it (or configure it via cmake) so that I can compile locally without connecting to the network?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [October 24, 2022, 3:52am UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/7 "2022-10-24T03:52:13Z")

</div>

> [@lhf](#):
>
> Local compilation does not require downloading the corresponding library from the Internet,

Network access does not significantly affect the build time. The first build may be slightly slower if you have a very, very slow network, but typically you download a library in a few ten seconds, but then build may takes tens of minutes. Also, this only slows down the first build. During subsequent builds, there is just a quick check if something is changed in the remote repository.

---

<div class="post-metadata">

### Author: ![lhf](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lhf](https://discourse.slicer.org/u/lhf)
#### Post date: [October 24, 2022, 4:05am UTC](https://discourse.slicer.org/t/how-does-3dslicer-compile-offline-locally/25849/8 "2022-10-24T04:05:48Z")

</div>

Thank you very much for your reply.
