diff --git a/Dockerfile b/Dockerfile index ceea97b..b97a470 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,11 @@ -FROM ubuntu:24.04 +FROM mambaorg/micromamba:2.3.2 -RUN apt-get update && \ - apt-get install -qqy lsb-release curl +COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /tmp/env.yaml +RUN micromamba install -y -n base -f /tmp/env.yaml && \ + micromamba clean --all --yes -RUN mkdir -p /etc/apt/keyrings && \ - curl http://robotpkg.openrobots.org/packages/debian/robotpkg.asc \ - | tee /etc/apt/keyrings/robotpkg.asc +ARG MAMBA_DOCKERFILE_ACTIVATE=1 -RUN echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/robotpkg.asc] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" \ - | tee /etc/apt/sources.list.d/robotpkg.list - -RUN apt-get update && \ - apt-get install -qqy \ - robotpkg-py3*-pinocchio \ - libcppad-dev \ - libeigen3-dev \ - libcgal-dev \ - git \ - cmake \ - ninja-build \ - nlohmann-json3-dev \ - build-essential \ - libfmt-dev - -ENV PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH -ENV LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH -ENV CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH COPY . cricket/ -RUN cmake -GNinja -Bbuild cricket && cmake --build build - -ENTRYPOINT ["/build/fkcc_gen"] +RUN cmake -GNinja -Bbuild -DCPM_SOURCE_CACHE=.cpm_cache cricket && cmake --build build +ENTRYPOINT ["/usr/local/bin/_entrypoint.sh", "/tmp/build/fkcc_gen"] diff --git a/README.md b/README.md index 9b7df56..80cbba5 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,12 @@ docker build . -t cricket Run the script: ```bash -docker run --rm -v "$(pwd):/workspace" -w /workspace --user "$(id -u):$(id -g)" cricket:latest resources/panda.json +docker run --rm -v "$(pwd):/mount" --user "$(id -u):$(id -g)" cricket:latest /mount/resources/panda.json -t /mount/panda.hh # Optionally format the code clang-format -i panda_fk.hh ``` +Note the use of the `/mount` directory and specification of output file. ## Configuration