rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.45k stars 273 forks source link

rocker/rstudio doesn't work on M1 Mac (arm) architecture #450

Closed steve273 closed 2 years ago

steve273 commented 3 years ago

Hello, having an issue with logging into Rstudio once the docker is running. When I run:

docker run --rm -p 8787:8787 -e PASSWORD=yourpasswordhere rocker/rstudio

Then open browser and try to log in with "rstudio" and specified password, I get the following error:

Error: Incorrect or invalid username/password

I see no errors in terminal or docker desktop. Running macOS 11.2.3.

cboettig commented 3 years ago

Sorry but I cannot reproduce this. Can you try:

Since you're running on a local machine, can you also try logging in without auth and see if that works?

docker run --rm \
  -p 127.0.0.1:8787:8787 \
  -e DISABLE_AUTH=true \
  rocker/rstudio

(note that binding to 127.0.0.1:8787 makes sure your connection is not available to other machines over the network, and we no longer need to bother with a password like we do on a remote server connection).

steve273 commented 3 years ago

Thanks for quick reply. I performed a fresh pull command and using a private window, still have the same error when I log in there.

When I use the second command to log in without authorization, I get the following:

"Rstudio Initialization Error" "Unable to connect to service"

Is there any additional information I can provide to help? Currently have docker desktop version 3.3.1 (63152).

cboettig commented 3 years ago

Very weird, sounds like issues we usually see with cache from another instance. This is an intel-based mac? Lots of things we might try but since I can't reproduce in the first place I'm shooting in the dark here.

consider restarting the docker daemon, making sure to stop any active rocker containers, and try first in a private window binding without auth to an alternate port (here localhost:8888):

docker run --rm \
  -p 127.0.0.1:8888:8787 \
  -e DISABLE_AUTH=true \
  rocker/rstudio
steve273 commented 3 years ago

Ah, maybe that's it. Using an arm based Mac. Might need to use another platform until these images are available for arm64?

cboettig commented 3 years ago

It could be, I can't say for sure, some aspects should be platform independent but others are not. One last thing to check would be to confirm that this fails on one of the older, frozen images, e.g. rocker/rstudio:3.6.3

steve273 commented 3 years ago

Still getting error:

"Rstudio Initialization Error" "Unable to connect to service"

I've used other and images with the docker virtualization layer without a problem. This seems like such a specific error, I wish I could help narrow it down further.

eitsupi commented 3 years ago

Is this the same problem? https://github.com/rocker-org/rocker-versioned2/issues/144

steve273 commented 3 years ago

Based on the screen shots in the other issue, yes, seeing the same thing here.

evdevdev commented 3 years ago

Not sure if this is helpful, but I can confirm I'm experiencing the same issue on an M1 mac as well.

dcaud commented 2 years ago

Isn't Docker supposed to prevent just this kind of problem?

cboettig commented 2 years ago

@dcaud no, I'm afraid not. docker can provide you a virtual linux-like environment on a mac or windows machine, but this is an issue about actual hardware. Docker systems have to build different image binaries for arm vs intel, just like other software. RStudio-server binaries are unfortunately not available on M1 macs yet, so we cannot package them in docker. Of course the RStudio team is aware of this, so keep an eye on https://github.com/rstudio/rstudio/issues/8809 and hope we'll be able to build arm-based images with RStudio-server soon!

yufree commented 2 years ago

Hi, following previous post, RStudio start building arm-based RStudio-server experimental binaries now.

eitsupi commented 2 years ago

duplicate of rocker-org/rocker-versioned2#144 Please check that issue.