Skip to content

Commit

Permalink
Updated:
Browse files Browse the repository at this point in the history
- sudo password support
  • Loading branch information
josiahls committed Oct 9, 2023
1 parent 06cc6f4 commit bcbb4aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fastrl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ ENV CONTAINER_GROUP fastrl_group
ENV CONTAINER_UID 1000
# Add user to conda
RUN addgroup --gid $CONTAINER_UID $CONTAINER_GROUP && \
adduser --uid $CONTAINER_UID --gid $CONTAINER_UID $CONTAINER_USER --disabled-password && \
mkdir -p /opt/conda && chown $CONTAINER_USER /opt/conda
adduser --uid $CONTAINER_UID --gid $CONTAINER_UID $CONTAINER_USER --disabled-password
# && \
# mkdir -p /opt/conda && chown $CONTAINER_USER /opt/conda

RUN apt-get update && apt-get install -y software-properties-common rsync curl
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 && apt-add-repository https://cli.github.com/packages
Expand Down Expand Up @@ -59,6 +60,10 @@ RUN pip3 show torch
RUN chown $CONTAINER_USER:$CONTAINER_GROUP -R /home/$CONTAINER_USER

RUN apt-get install sudo
# Give user password-less sudo access
RUN echo "$CONTAINER_USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$CONTAINER_USER && \
chmod 0440 /etc/sudoers.d/$CONTAINER_USER

RUN /bin/bash -c "if [[ $BUILD == 'dev' ]] ; then nbdev_install_quarto ; fi"

# RUN mkdir -p /home/$CONTAINER_USER/.mujoco \
Expand Down

0 comments on commit bcbb4aa

Please sign in to comment.