# MonaiLabel and Slicer Issues

**URL:** <https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049>\
**Category:** Support\
**Created:** [March 25, 2024, 12:08pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049 "2024-03-25T12:08:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [March 25, 2024, 12:08pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/1 "2024-03-25T12:08:59Z")

</div>

Hello,  
I am running into some issues with MonaiLabel.

I tried installing monailabel via docker. The image was created but I get several issues:  
-In docker:

> WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
> 
> Use the NVIDIA Container Toolkit to start this container with GPU support; see  
> [NVIDIA Cloud Native Technologies - NVIDIA Docs](https://docs.nvidia.com/datacenter/cloud-native/)

-How do I install the Container toolkit on windows?

-do I need to install the cuda drivers on my system? or is this in the docker image?  
I assume it is still good to install on the system so that I can also use them for Slicer?

-Finally, I tried downloading slicer but it does not open. I am not sure if in the process of trying to install MonaiLabel I made a mistake.

Thank you!  
Eva

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [March 25, 2024, 12:13pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/2 "2024-03-25T12:13:33Z")

</div>

I also checked this and found no .dll error: [Get Help — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/user_guide/get_help.html#slicer-application-does-not-start)

and running in admin mode did not work

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 25, 2024, 3:18pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/3 "2024-03-25T15:18:02Z")

</div>

> [@evaherbst](#):
>
> WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
> 
> Use the NVIDIA Container Toolkit to start this container with GPU support; see  
> [NVIDIA Cloud Native Technologies - NVIDIA Docs](https://docs.nvidia.com/datacenter/cloud-native/)

Try this link. I believe the best way of running docker on windows is through the WSL2 (windows subsystem for linux). [CUDA on WSL (nvidia.com)](https://docs.nvidia.com/cuda/wsl-user-guide/index.html)

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [March 25, 2024, 3:57pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/4 "2024-03-25T15:57:34Z")

</div>

Thank you Murat!  
Or do you recommend just installing without docker (either directly or with a conda venv)?

Regarding the Slicer bug, I just reinstalled windows since the computer was new and this seemed the best way to reset any issues I created with dependencies.  
Slicer works now (have not yet reinstalled monai and cuda and pytorch)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 25, 2024, 7:50pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/5 "2024-03-25T19:50:20Z")

</div>

> [@evaherbst](#):
>
> Or do you recommend just installing without docker (either directly or with a conda venv)?

I never tried that. Don’t have any info to share. Others may have.

---

<div class="post-metadata">

**Author:** ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)\
**Post date:** [March 25, 2024, 9:32pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/6 "2024-03-25T21:32:10Z")

</div>

Hi @evaherbst,

Thanks for sharing your experience.

> - I tried installing monailabel via docker. The image was created but I get several issues:

You don’t need to install monailabel via docker. Just download the MONAI Label Docker container and use MONAI Label.

`docker pull projectmonai/monailabel`

[https://hub.docker.com/r/projectmonai/monailabel](https://hub.docker.com/r/projectmonai/monailabel)

Otherwise, you can also use this command to start the bash within the MONAI Label Docker container:

`docker run --gpus all --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash`

> - How do I install the Container toolkit on windows?

Did you make sure you have Docker on your computer? This is the first step to using the MONAI Label Docker container.

> -do I need to install the cuda drivers on my system? or is this in the docker image?  
> I assume it is still good to install on the system so that I can also use them for Slicer?

Yes, this is a requirement to use your GPU. Do you know which GPU you have on your PC?

> -Finally, I tried downloading slicer but it does not open. I am not sure if in the process of trying to install MonaiLabel I made a mistake.

Sorry, I’m not sure what didn’t open - MONAI Label? Slicer?  
If MONAI Label, the first part of the process is to start the MONAI Label server. From what I understood, you haven’t managed to start the server.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [March 26, 2024, 8:53am UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/7 "2024-03-26T08:53:13Z")

</div>

Thank you so much @muratmaga and @diazandr3s

Sorry for being unclear. I am still learning all of the terminology around docker.  
I did not install monailabel - I installed docker and then used:

> docker pull projectmonai/monailabel:latest

> docker run -it --rm --gpus all --ipc=host --net=host -v ~:/workspace/ projectmonai/monailabel:latest bash

I read that I need to also install the Nvidia Container Toolkit for the monailabel docker container, is this true? In docker in the container I got the warning: “WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.”

> Yes, this is a requirement to use your GPU. Do you know which GPU you have on your PC?

I have the following GPU: NVIDIA GeForce RTX 4090 24GB  
I use Windows 11.

I had CUDA 12.1 installed on my system before installing docker etc. Is this the right version of CUDA to install? I saw there is also 12.4.

> Sorry, I’m not sure what didn’t open - MONAI Label? Slicer?

Slicer just started loading and then crashed before fully opening. I had no error logs. In the end I reinstalled windows (I was worried I had messed up some dependencies, and since it was a new machine this seemed the simplest solution).

So now I want to make sure I install everything correctly to not cause any issues with Slicer again.

Thank you very much!  
Eva

---

<div class="post-metadata">

**Author:** ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)\
**Post date:** [March 26, 2024, 1:34pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/8 "2024-03-26T13:34:39Z")

</div>

Hi @evaherbst,

> I read that I need to also install the Nvidia Container Toolkit for the monailabel docker container, is this true?

No, you don’t need that for the MONAI Label Docker container to work.

> In docker in the container I got the warning: “WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.”

Once you are in the MONAI Label Docker bash terminal, can you run **nvidia-smi** to check whether the GPU is visible?

Have you tried starting the MONAI Label server?

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [March 26, 2024, 2:17pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/9 "2024-03-26T14:17:00Z")

</div>

Thank you so much @diazandr3s for the quick reply!

That is really helpful.

This is for our computer at the clinic, and I am not there today, but I will try it tomorrow.  
Just to clarify, which CUDA version should I install? Does it amtter?

Thanks!  
Eva

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [April 3, 2024, 1:42pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/10 "2024-04-03T13:42:51Z")

</div>

Dear @diazandr3s ,

I was able to start the server:

> [2024-04-03 13:44:13,200] [657] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set  
> [2024-04-03 13:44:13,200] [657] [MainThread] [INFO] (uvicorn.error:62) - Application startup complete.  
> [2024-04-03 13:44:13,200] [657] [MainThread] [INFO] (uvicorn.error:217) - Uvicorn running on [http://0.0.0.0:8000](http://0.0.0.0:8000)

I then tried the tutorial [here](https://docs.monai.io/projects/label/en/latest/quickstart.html), I downloaded the models and tried to connect to the server in Slicer but am getting the following error:

> Failed to fetch models from remote server. Make sure server address is correct and \<server\_uri\>/info/ is accessible in browser.

I tried using hosts:  
[http://0.0.0.0:8000](http://0.0.0.0:8000) or  
[http://127.0.0.1:8000](http://127.0.0.1:8000) or  
[http://localhost:8000](http://localhost:8000) or leaving it blank

details:

```auto
Traceback (most recent call last):
File "C:/Users/Eva/AppData/Local/slicer.org/Slicer 5.6.1/slicer.org/Extensions-32438/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 1085, in fetchInfo
info = self.logic.info()
File "C:/Users/Eva/AppData/Local/slicer.org/Slicer 5.6.1/slicer.org/Extensions-32438/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 2288, in info
return self._client().info()
File "C:/Users/Eva/AppData/Local/slicer.org/Slicer 5.6.1/slicer.org/Extensions-32438/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 2264, in _client
if mc.auth_enabled():
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\slicer.org\Extensions-32438\MONAILabel\lib\Slicer-5.6\qt-scripted-modules\MONAILabelLib\client.py", line 83, in auth_enabled
status, response, _, _ = MONAILabelUtils.http_method("GET", self._server_url, selector)
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\slicer.org\Extensions-32438\MONAILabel\lib\Slicer-5.6\qt-scripted-modules\MONAILabelLib\client.py", line 521, in http_method
conn.request(method, selector, body=body, headers=headers)
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\http\client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\http\client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\http\client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\http\client.py", line 1040, in _send_output
self.send(msg)
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\http\client.py", line 980, in send
self.connect()
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\http\client.py", line 946, in connect
self.sock = self._create_connection(
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\socket.py", line 844, in create_connection
raise err
File "C:\Users\Eva\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\socket.py", line 832, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

```

**I am using Slicer 5.6 - I tried installing 5.7 but it does not open, similar to the behaviour I had a while back**

**Please let me know if this should be posted on the Monai Forum instead**

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [April 3, 2024, 4:01pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/11 "2024-04-03T16:01:04Z")

</div>

maybe it is a problem with the university proxy server I am using

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 3, 2024, 4:36pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/12 "2024-04-03T16:36:59Z")

</div>

Those addresses are local to your computer, so proxy shouldn’t be an issue. However, if this is a company managed device, there might be policies blocking what you can do on the computer.

After you start monaiLabel server, launch web browser and type those addresses, and see it connects (again on the same computer you launched monaiLabel). If it they do not connect, there is a problem with the server.

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [April 10, 2024, 3:18pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/13 "2024-04-10T15:18:44Z")

</div>

Thank you Murat. I was waiting for IT to check out if it is an issue with the proxy server, but they had no solutions.

maybe I am doing something wrong with docker - it did look like the server started but I cannot view those addresses in a web browser nor access them with slicer.

I also attempted to install via an anaconda venv and also just directly in my system.

I checked “nvcc-version” and cuda 11.8 is installed so I used:  
pip install torch torchvision torchaudio --extra-index-url [https://download.pytorch.org/whl/cu118](https://download.pytorch.org/whl/cu118)

however, when I run “python -c “import torch; print(torch.cuda.is\_available())”” it just stalls.

It is strange because this worked before.

Thanks,  
Eva

---

<div class="post-metadata">

**Author:** ![evaherbst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evaherbst/32/65595_2.png) [@evaherbst](https://discourse.slicer.org/u/evaherbst)\
**Post date:** [May 7, 2024, 2:19pm UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/14 "2024-05-07T14:19:21Z")

</div>

Hi everyone,

I am not sure why (since I was running MonaiLabel locally) but it seems that the cause of my installation issues was due to the university proxy (which I was told to use to access the internet).  
I instead purchased a WIFI dongle and used WIFI (to avoid the proxy). I installed monailabel in a miniconda venv on Windows and everything worked well.

Thanks for everyone’s help.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 8, 2024, 2:58am UTC](https://discourse.slicer.org/t/monailabel-and-slicer-issues/35049/15 "2024-05-08T02:58:02Z")

</div>

> [@evaherbst](#):
>
> ssues was due to the university proxy

proxy and security policies on network can break things in a very unpredictable and difficult to diagnose way (since you are the only one with that issue, nobody can replicate). When I encounter an issue which I suspect may be due to security policies, I try the same on a personal computer not tied to the company network to see if it replicates.

Glad that wifi solved the issue.
