Open lwaldron opened 3 years ago
Also, I noticed that my little hack of getting rid of the --user
flag doesn't help for my rstudio-server command from the waldronlab/bioconductor crate, which doesn't contain the user flag but nonetheless has the same clang problem:
waldronlab/metagenomics|~ % cat `which rstudio-server`
#!/bin/sh
docker run --rm --init \
--volume=/Users/lwaldron/R/bioc-release:/usr/local/lib/R/host-site-library -e DISABLE_AUTH=true -p 8787:8787 -v /Users/lwaldron:/home/rstudio \
--env "DISPLAY" \
--volume "$HOME:$HOME" \
--workdir="`pwd`" \
waldronlab/bioconductor:release "$@"%
Hmm, is it just a case of needing to not map the user? Are you using no_user
mode?
https://bulker.databio.org/en/latest/advanced_templates/
I don't quite understand the final thing about the rstudio-server one though, why that would matter...
I'm using the create directly from https://github.com/databio/hub.bulker.io/blob/master/waldronlab/bioconductor.yaml, so I guess that's why the user mapping isn't present in my rstudio-server bulker script? Here's the full diff on those scripts:
waldronlab/metagenomics|~ % diff `which R` `which rstudio-server`
4,5c4
< -it --volume=/Users/lwaldron/R/bioc-release:/usr/local/lib/R/host-site-library -e DISABLE_AUTH=true -p 8787:8787 -v /Users/lwaldron:/home/rstudio \
< --network="host" \
---
> --volume=/Users/lwaldron/R/bioc-release:/usr/local/lib/R/host-site-library -e DISABLE_AUTH=true -p 8787:8787 -v /Users/lwaldron:/home/rstudio \
8,11d6
< --volume="/etc/group:/etc/group:ro" \
< --volume="/Users/lwaldron/templates/mac_passwd:/etc/passwd:ro" \
< --volume="/etc/shadow:/etc/shadow:ro" \
< --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
13c8
< waldronlab/bioconductor:release R "$@"
---
> waldronlab/bioconductor:release "$@"
\ No newline at end of file
(oops, note, I had manually deleted the `--user`` flag from the R script above)
This seems like some kind of problem with clang in the waldronlab/bioconductor:release
image
You could just add no_user
to that image's settings in your bulker config. That solves the first problem just so you don't have to remove --user
manually. But, then it will only work on MacOS, right? And it doesn't seem to really solve the underlying issue...
Because I can't explain why behavior is different when you use rstudio-server. That's the same image... so I guess to me this seems like a problem with the image that it outside of bulker. I mean, can you install stuff in that image just using straight-up docker? That's the issue to solve here. I think the user thing gives some kind of a hint that it may have to do with permissions or file locations or something. Unfortunately, I have no experience with clang.
I'm currently unable to install packages requiring compiled C code when using my bulker (0.6.0) scripts on macOS Big Sur 11.1. I noticed the problem just after my recent upgrade to macOS 11, but can't guarantee that's when the problem started. Here is an example:
I can fix the problem by getting rid of the " --user=$(id -u):$(id -g)" line in my bulker script, e.g. the following completes normally:
Here is my bulker R script (from the waldronlab/bioconductor bulker crate):
FWIW, there is a host clang installation, which isn't in the PATH after entering a bulker shell:
clang still isn't in the PATH when removing the
--user
flag, even though I can now compile packages, which I don't understand. It's also not in the path when repeating on my Linux machine, even though I have no problems there.Just FYI, other than my username being root and home directory being
/
while invoking docker without the --user flag, file permissions seem to be handled correctly as the host user. Happy to give you remote access to my macOS machine if it'll help.