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

Will this project work for Mac OSX? #29

Closed
daj opened this issue Nov 11, 2019 · 6 comments
Closed

Will this project work for Mac OSX? #29

daj opened this issue Nov 11, 2019 · 6 comments

Comments

@daj
Copy link
Contributor

daj commented Nov 11, 2019

Is this supported on a Mac? I didn't see Mac support mentioned in the README or any issues, and wanted to check if this will work before I go too far down the path of installing all the prerequisites.

The underlying project appears to be supported on Mac, though some custom steps are required, as listed in these guides:
aws-deepracer-community/deepracer-core#11 (comment)
https://github.com/kevinmarlis/deep-racer/blob/master/Mac-Local-Training-Installation.md

I'm using macOS Mojave 10.14.6 with Intel Iris Pro 1536MB.

@daj
Copy link
Contributor Author

daj commented Nov 11, 2019

The init.sh script appears to work, but there were at least two problems with the start.sh script:

  • Path /robo/container is incorrect.
  • gnome-terminal is not present.

I opened the linked PRs to fix these.

However, even after fixing these two problems, I can't find any sagemaker logs. vncviewer shows a car going around/near a track for a few minutes, before eventually the track and car disappear.

Screen Shot 2019-11-11 at 3 27 49 PM

Screen Shot 2019-11-11 at 4 02 16 PM

It seems like maybe the rl_coach Docker container is failing to start?

docker ps | awk ' /sagemaker/ { print $1 }' is returning blank. Listing the running Docker processes shows only these two:

$ docker ps
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS              PORTS                    NAMES
69929948db1c        crr0004/deepracer_robomaker:console   "/bin/bash -c './run…"   5 minutes ago       Up 5 minutes        0.0.0.0:8080->5900/tcp   robomaker
9b640cb2cf3d        minio/minio                           "/usr/bin/docker-ent…"   5 minutes ago       Up 5 minutes        0.0.0.0:9000->9000/tcp   minio

I was able to get Sagemaker to run in a Python virtualenv by following the deepracer project instructions, with one slight tweak: aws-deepracer-community/deepracer-core#78

I would like to get it working via deepracer-for-dummies, as the instructions are much easier to follow...

DETAIL

Here are the outputs of the init and start scripts.

These warnings/errors are output by the init.sh script on macOS Mojave 10.14.6 (not sure if they are benign):

debconf: delaying package configuration, since apt-utils is not installed
...
Warning: apt-key output should not be parsed (stdout is not a terminal)
...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
...

I reviewed the output from init.sh, and these were the only warnings/errors:

$ ./init.sh 
Cloning into 'deepracer'...
...
Setting up packagekit (1.1.5-2+deb9u1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of force-reload.
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Setting up packagekit-tools (1.1.5-2+deb9u1) ...
...
Get:23 https://download.docker.com/linux/debian stretch/stable amd64 docker-ce amd64 5:19.03.4~3-0~debian-stretch [22.8 MB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
Fetched 97.2 MB in 6s (14.4 MB/s)
...
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
...
Successfully built 46166b72ccdb
Successfully tagged aschu/rl_coach:latest

Here is the output from running start.sh (includes the code from the two open PRs):

$ ./start.sh
Creating minio ... done
Creating rl_coach ... done
Creating robomaker ... done
waiting for containers to start up...
Error: skip showing sagemaker logs because gnome-terminal is not installed.  This is normal if you are on a different OS to Ubuntu.
attempting to open vnc viewer...

@alexschultz
Copy link
Collaborator

The container is attempting to mount the directory from the host filesystem at this path.
mounts

Changing the volume in the compose file breaks this and you end up with this error:
No /opt/ml/input/config/resourceconfig.json
which causes the sagemaker container to fail on startup

@alexschultz
Copy link
Collaborator

in order to make this work with a relative path (i.e. the volumes directory in this repo), we need to figure out how to change where the container is trying to mount the "robo" directory.

@alexschultz
Copy link
Collaborator

alexschultz commented Nov 26, 2019

for reference, the code where this seems to break down can be found here:
./deepracer-for-dummies/deepracer/sagemaker-containers/src/sagemaker_containers/_env.py
It tries to configure the environment path in this file.

larsll added a commit that referenced this issue Oct 3, 2020
* Fix for bug #29

* Fix for bug #31

* Fix for bug #30
@larsll
Copy link
Contributor

larsll commented Jan 24, 2021

With the merge of Deepracer-for-Cloud and Deepracer-for-Dummies it is now possible to run on MacOS.

@larsll larsll closed this as completed Jan 24, 2021
@jarrettj
Copy link

Don't run ./bin/prepare.sh on your Mac M1 :) It will wipe out docker-compose.

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

4 participants