Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Docker mac #8

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Docker mac #8

wants to merge 11 commits into from

Conversation

swangcs
Copy link
Collaborator

@swangcs swangcs commented Aug 4, 2020

No description provided.

@swangcs swangcs requested a review from lcodeca as a code owner August 4, 2020 09:03
LABEL Author="Lara CODECA ([email protected])"
LABEL Description="Dockerised SUMO-devel with tensorflow-gpu environment."

ARG USER_ID
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not using

ARG USER_ID
ARG GROUP_ID

and you hardcoded them in

RUN groupadd --gid 222 alice && \
    useradd -m -s /bin/bash -u 502 -g 222 alice && \
    echo "alice:alice" | chpasswd && adduser alice sudo

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in commit ac6dd1c


## Step 2: Run a container of the built image

`sudo bash docker-cmd-mac.sh --image-name=tf-gpu-sumo-2020-08-03 --run --no-gpu`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use tf-gpu-sumo-{today_date} instead of a specific date?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in commit 0d33ba4

else
DETACH=""
fi
CURR_UID=$(id -u)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the variables

CURR_UID=$(id -u)
CURR_GID=$(id -g)

are still set and pass to docker, even if they are hardcoded in the Dockerfile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now can also be set through command line 3700450

IMAGE_FOLDER="docker-image-mac"
GPU=true
GPU_OPT="--gpus all"
OPTIRUN=false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optirun does not exist for Mac OSX

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in the commit 97d2053


## Step 2: Run a container of the built image

`sudo bash docker-cmd-mac.sh --image-name=tf-gpu-sumo-2020-08-03 --run --no-gpu`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running docker using sudo it's not a good practice.
Given that without it does not work, and it's a problem of user privilege between host and container, it needs to be highlighted as a security issue, at least in the HOWTO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in the commit ad4dbca


# Download & install RLLIB+SUMO Utils
WORKDIR /home/alice/libraries
RUN git clone --depth 1 https://github.com/lcodeca/rllibsumoutils.git rllibsumoutils
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for this change that I applied today.
Given that the latest devel version may be unstable, I changed it from main branch to v1_6_0
See 42a5dec

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries, synchronised now f0d44a0

@@ -0,0 +1,65 @@
# RLLIB SUMO Docker environment for MacOS
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding yourself as the author of this document?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for the advice, added now 1301a20


`sudo bash docker-cmd-mac.sh --image-name={your_image_name} --run --no-gpu`

> :warning: **Using SUDO for docker is not a good practice**: Due to a problem of user privilege between host and container, `sudo` has to be used here to make it work. We will address this security issue soon.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will address this security issue soon.

Are you sure it's addressable in the first place?
Otherwise, we can keep warning and remove the last statement, or we can say "We will address this security issue, eventually.".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revised the last sentence accordingly c5d0277

COMMAND=""
EXP=""
DETACH=false

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add a new parameter, due to the warning issued by the deep RL infrastructure.
See fd5ea7a

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

synchronised now 7d3d349

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

Successfully merging this pull request may close these issues.

2 participants