Skip to content

Commit

Permalink
Use poetry run as the entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
apockill committed Nov 25, 2024
1 parent 59c1a78 commit 26dcaff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docker/lerobot-compose/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
htop atop nvtop \
sed gawk grep curl wget zip unzip \
tcpdump sysstat screen tmux \
libglib2.0-0 libgl1-mesa-glx libegl1-mesa \
libglib2.0-0 libgl1 libglx-mesa0 \
speech-dispatcher \
# python*-dev is required for building certain python dependencies
python${PYTHON_VERSION} python${PYTHON_VERSION}-venv python${PYTHON_VERSION}-dev \
Expand Down Expand Up @@ -55,8 +55,6 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
RUN curl -sSL https://install.python-poetry.org | python -
ENV PATH="/root/.local/bin:$PATH"
RUN echo 'if [ "$HOME" != "/root" ]; then ln -sf /root/.local/bin/poetry $HOME/.local/bin/poetry; fi' >> /root/.bashrc
RUN poetry config virtualenvs.create false
RUN poetry config virtualenvs.in-project true

# Copy in pyproject
WORKDIR /lerobot
Expand All @@ -66,5 +64,11 @@ ARG POETRY_EXTRAS="none"
RUN --mount=type=cache,target="${PIP_CACHE}" \
poetry install --extras ${POETRY_EXTRAS}

ENV PYTHONPATH="/lerobot:${PYTHONPATH}"

# Set the entrypoint such that users enter the container with the poetry environment
ENTRYPOINT ["poetry", "run"]
CMD ["bash"]

# Set EGL as the rendering backend for MuJoCo
ENV MUJOCO_GL="egl"

0 comments on commit 26dcaff

Please sign in to comment.