Issue with the Miniconda Docker image or using Conda in Singularity in general

748 views
Skip to first unread message

Bili Dong

unread,
Oct 19, 2017, 10:08:44 PM10/19/17
to singularity
Hello all,

I'm writing to request some help on an issue I encountered that I couldn't solve by myself.

I'm using Singularity 2.4. To reproduce the error, do the following:

```
singularity shell docker://continuumio/miniconda3:4.3.27
```

then within Singularity, do:

```
python -c "import multiprocessing as mp; mp.Queue()"
```

which results in the following error:

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/conda/lib/python3.6/multiprocessing/context.py", line 102, in Queue
    return Queue(maxsize, ctx=self.get_context())
  File "/opt/conda/lib/python3.6/multiprocessing/queues.py", line 42, in __init__
    self._rlock = ctx.Lock()
  File "/opt/conda/lib/python3.6/multiprocessing/context.py", line 67, in Lock
    return Lock(ctx=self.get_context())
  File "/opt/conda/lib/python3.6/multiprocessing/synchronize.py", line 163, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/opt/conda/lib/python3.6/multiprocessing/synchronize.py", line 60, in __init__
    unlink_now)
FileNotFoundError: [Errno 2] No such file or directory
```

The same code would work inside a Docker container. So I expected it to work in the corresponding Singularity container too. But it doesn't.

Thanks very much for your time!

Best,
Bili

Chris Gorgolewski

unread,
Oct 19, 2017, 11:04:33 PM10/19/17
to singu...@lbl.gov

Best,
Chris

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.

Bili Dong

unread,
Oct 19, 2017, 11:11:58 PM10/19/17
to singularity
Thanks Chris. This does look like the same issue.

Best,
Bili

Best,
Chris

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.

Bili Dong

unread,
Oct 19, 2017, 11:30:34 PM10/19/17
to singularity
So this is a known issue, and the current workaround is to add /run as a bind path, like this:

```
singularity shell -B /run docker://continuumio/miniconda3:4.3.27
```

See the following links for previous discussions:
Reply all
Reply to author
Forward
0 new messages