Skip to content

Commit

Permalink
meshlab runs from container
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Jul 16, 2024
1 parent eccca4d commit 9514e0c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ FROM ubuntu:20.04

RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
build-essential \
dbus-x11 \
fontconfig \
fuse \
git \
kmod \
libboost-dev \
libcanberra-gtk3-0 \
libdbus-1-3 \
libegl-dev \
libfuse2 \
Expand All @@ -25,6 +27,7 @@ RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
libxkbcommon-x11-dev \
ninja-build \
patchelf \
packagekit-gtk3-module \
python3 \
python3-pip

Expand Down Expand Up @@ -52,4 +55,7 @@ RUN apt purge --auto-remove cmake && \
apt-get -y remove wget && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*

# Generating a universally unique ID for the Container
RUN dbus-uuidgen > /etc/machine-id
13 changes: 13 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Running Meshlab in a Docker container

After built meshlab in the container, you can run it, but you'll need to give it access to the X server. You can do this by running the following command in the host machine:

```bash
xhost +local:*
```

You can disable access to the X server later by running the following command in the host machine:

```bash
xhost -local:*
```
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools"
]
],
"settings": {
"cmake.buildDirectory": "${workspaceFolder}/build"
}
}
}
}
4 changes: 4 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ services:
dockerfile: Dockerfile
stdin_open: true # docker run -i
tty: true # docker run -t
# flag -e DISPLAY=$DISPLAY
environment:
DISPLAY: $DISPLAY
volumes:
- ..:/workspaces/meshlab
- /tmp/.X11-unix:/tmp/.X11-unix
# Next flags are necessary to deploy meshlab and create the AppImage
# fuse is needed. If you don't plan to create the AppImage, you can remove the
# following lines
Expand Down

0 comments on commit 9514e0c

Please sign in to comment.