Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run docker with M1 Macs #364

Open
Valleyaapo opened this issue Sep 13, 2021 · 3 comments
Open

Unable to run docker with M1 Macs #364

Valleyaapo opened this issue Sep 13, 2021 · 3 comments

Comments

@Valleyaapo
Copy link

Expected behavior

Docker run should not get stuck

Observed behavior

Using M1 Mac docker run for OpenTripPlanner gets stuck and prints only JAR=otp-shaded.jar

Data sets in use

I followed the guide in the link on how to use OpenTripPlanner with docker
https://digitransit.fi/en/developers/architecture/x-apis/1-routing-api/

Command line used to start OTP

docker run -e OTP_DATA_CONTAINER_URL=http://otp-data-container:8080 -p 8080:8080 hsldevcom/opentripplanner

Steps to reproduce the problem

Run the above command in Apple silicon M1 environment

@optionsome
Copy link
Member

Seems like the documentation is missing a step or two for that command to work. It would require you to have a data container locally with the dns name otp-data-container.

I think the other command found in the same documentation is closer to being correct. docker run --rm --name otp-hsl -p 9080:8080 -e ROUTER_NAME=hsl -e JAVA_OPTS=-Xmx5g -e ROUTER_DATA_CONTAINER_URL=https://api.digitransit.fi/routing-data/v2/hsl hsldevcom/opentripplanner:prod should work if you just want to run the router with HSL data locally (the allocated memory seems a bit low, u can increase it if there are problems). There will be some "java.net.UnknownHostException: digitransit-proxy: Try again" type errors when u run it because it tries to access some external APIs through a proxy that u don't have running locally but it should function normally but just without some bike rental stations etc.

If u want to run OpenTripPlanner with ur own data set or with ur own code changes, it's a bit different. Here is some documentation for it https://github.com/HSLdevcom/digitransit/wiki/Guide-for-building-and-viewing-Digitransit-OTP-graphs-locally

@Valleyaapo
Copy link
Author

the above command still gets stuck and just prints JAR=otp-shaded.jar

@optionsome
Copy link
Member

optionsome commented Sep 22, 2021

Have you had trouble using any other docker images? I have no idea what could cause this issue within the entrypoint of this image but saw that there might be some general issues related to docker in mac docker/for-mac#5590 . Unfortunately no one in our team has a M1 mac so fixing this is a bit difficult. You can try building the docker image yourself from this repository and if you are not able to run the image, you can try editing the run.sh file to see where it gets stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants