Skip to content

Commit

Permalink
meshlab dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Jul 15, 2024
1 parent dff56b5 commit 42ed3e2
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM ubuntu:20.04

RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
build-essential \
fontconfig \
fuse \
git \
kmod \
libdbus-1-3 \
libegl-dev \
libfuse2 \
libgmp-dev \
libglu1-mesa-dev \
libmpfr-dev \
libpulse-mainloop-glib0 \
libtbb-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-render-util0-dev \
libxcb-shape0 \
libxcb-xinerama0-dev \
libxerces-c-dev \
libxkbcommon-x11-dev \
ninja-build \
patchelf \
python3 \
python3-pip

RUN pip3 install aqtinstall

ARG QT=5.15.2
ARG QT_HOST=linux
ARG QT_TARGET=desktop
RUN aqt install-qt -O /opt/qt ${QT_HOST} ${QT_TARGET} ${QT}

ENV PATH=/opt/qt/${QT}/gcc_64/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/qt/${QT}/gcc_64/lib/
ENV QT_PLUGIN_PATH=/opt/qt/${QT}/gcc_64/plugins/
ENV QML_IMPORT_PATH=/opt/qt/${QT}/gcc_64/qml/
ENV QML2_IMPORT_PATH=/opt/qt/${QT}/gcc_64/qml/

# install latest cmake
RUN apt purge --auto-remove cmake && \
apt-get -y install wget && \
wget -qO- "https://cmake.org/files/v3.19/cmake-3.19.2-Linux-x86_64.tar.gz" \
| tar --strip-components=1 -xz -C /usr/local && \
apt-get -y remove wget && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "MeshLab",
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/meshlab",

// vscode extensions
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools"
]
}
}
}
22 changes: 22 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
stdin_open: true # docker run -i
tty: true # docker run -t
volumes:
- ..:/workspaces/meshlab
# 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
- /lib/modules:/lib/modules
# flag --device /dev/fuse
devices:
- /dev/fuse
# flag --cap-add SYS_ADMIN
cap_add:
- SYS_ADMIN
# flag --security-opt apparmor:unconfined
security_opt:
- apparmor:unconfined
6 changes: 3 additions & 3 deletions scripts/Linux/make_it.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
SOURCE_PATH=$SCRIPTS_PATH/../..
BUILD_PATH=$SOURCE_PATH/../build
INSTALL_PATH=$SOURCE_PATH/../install
PACKAGE_PATH=$SOURCE_PATH/../packages
BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
PACKAGE_PATH=$SOURCE_PATH/packages

DOUBLE_PRECISION_OPTION=""
NIGHTLY_OPTION=""
Expand Down

0 comments on commit 42ed3e2

Please sign in to comment.