Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 7 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down