Skip to content

Commit

Permalink
Add PlotJuggler, move python env to root
Browse files Browse the repository at this point in the history
  • Loading branch information
faizansana committed Feb 23, 2024
1 parent 4eeec7d commit b9b7181
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,41 @@ RUN USER=docker && \
printf "user: $USER\ngroup: $GROUP\npaths:\n - /home/docker/" > /etc/fixuid/config.yml

# Install vnc server
USER root:root
RUN apt-get update && apt-get install -y lxde x11vnc xvfb mesa-utils && apt-get purge -y light-locker
RUN apt-get install -y supervisor
EXPOSE 5900
RUN apt-get update && \
apt-get install -y lxde x11vnc xvfb mesa-utils supervisor && \
apt-get purge -y light-locker && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY --chown=docker ./supervisord.conf /etc/supervisor/supervisord.conf
RUN chown -R docker:docker /etc/supervisor
RUN chmod 777 /var/log/supervisor/

COPY --from=carla /home/carla/PythonAPI /opt/carla/PythonAPI

# Install miniconda
# Setup Python Environment
USER docker:docker
ENV SHELL=/bin/bash
ENV CARLA_VERSION ${CARLA_VERSION:?}
ENV PYTHON_VENV_NAME driving

COPY --chown=docker:docker ./requirements.txt /tmp

# Install python packages under root to avoid Fixuid changing the owner of the files
USER root:root
WORKDIR /home/docker
RUN python3.8 -m venv $PYTHON_VENV_NAME && \
source $PYTHON_VENV_NAME/bin/activate && \
pip install --upgrade pip && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
echo "source /home/docker/$PYTHON_VENV_NAME/bin/activate" >> ~/.bashrc
pip install --no-cache-dir -r /tmp/requirements.txt

USER docker:docker
RUN echo "source /home/docker/$PYTHON_VENV_NAME/bin/activate" >> ~/.bashrc

# Add PlotJuggler AppImage
RUN wget -O PlotJuggler-3.5.0.AppImage https://github.com/facontidavide/PlotJuggler/releases/download/3.5.0/PlotJuggler-3.5.0-x86_64.AppImage && \
chmod +x PlotJuggler-3.5.0.AppImage && \
./PlotJuggler-3.5.0.AppImage --appimage-extract

# Install carla python api if carla v0.9.12 or greater, otherwise add the egg to the python path
RUN if [[ "$CARLA_VERSION" > "0.9.11" ]]; then \
Expand Down

0 comments on commit b9b7181

Please sign in to comment.