Skip to content

Commit

Permalink
#357 handle virtualgl by creating a conda package for it
Browse files Browse the repository at this point in the history
  • Loading branch information
sapetnioc committed Feb 29, 2024
1 parent a97dcf4 commit 26d629e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 7 deletions.
4 changes: 4 additions & 0 deletions python/casa_distro/conda_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
"torchvision",
"pywebp",
],
"brainvisa-forge": [
"brainvisa-virtualgl",
],
"pip": [
"pygltflib",
],
Expand Down Expand Up @@ -211,6 +214,7 @@ def pin_compatible(
component_depends,
package_info.get("depends", []),
metadata.get("depends", {}).get("conda-forge", []),
metadata.get("depends", {}).get("brainvisa-forge", []),
):
m = re.match("^{{(.*)}}", d)
if m:
Expand Down
58 changes: 58 additions & 0 deletions setup/conda/rattler-build/virtualgl/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json

context:
name: brainvisa-virtualgl
version: 3.1.1

package:
name: ${{ name|lower }}
version: ${{ version }}

source:
git: https://github.com/VirtualGL/virtualgl
tag: ${{ version }}

build:
# skip:
# - win
# - osx
number: 0
script: |
cmake -G"Unix Makefiles" "-DCMAKE_INSTALL_PREFIX=$PREFIX" "-DCMAKE_PREFIX_PATH=$CONDA_PREFIX;;$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr" "-DCMAKE_REQUIRED_INCLUDES=$CONDA_PREFIX/include;$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/include" "-DOPENGL_egl_LIBRARY=$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib64/libEGL_mesa.so.0" "$SRC_DIR"
make -j
make install
requirements:
build:
- ${{ compiler('cxx') }}
- cmake
- make
- libjpeg-turbo
- openjdk
- xorg-libx11
- xorg-libxi
- xorg-libxext
- mesalib
- cuda-opencl-dev
- mesa-libgl-devel-cos7-x86_64
- mesa-libegl-devel-cos7-x86_64
- mesa-libglu-devel-cos7-x86_64
- libstdcxx-ng
- libxcb
- libxcb-devel-cos7-x86_64
- xcb-util-keysyms-devel-cos7-x86_64

tests:
- script: vglrun

about:
homepage: https://www.virtualgl.org/
summary: VirtualGL optimizes remote application performance by intercepting and redirecting OpenGL commands for smoother graphics rendering.
description: |
VirtualGL is a versatile toolkit that optimizes the graphical performance of applications running remotely on a server but displayed locally on a client machine. By intercepting OpenGL commands from the remote application and directing them to the client for rendering, VirtualGL enhances responsiveness and efficiency, particularly for graphics-intensive tasks like CAD, scientific visualization, and gaming. This technology enables smoother, more responsive user experiences in remote computing environments by reducing network bandwidth requirements and ensuring high-quality graphics output.
documentation: https://virtualgl.org/Documentation/Documentation
repository: https://github.com/VirtualGL/virtualgl

extra:
recipe-maintainers:
- BrainVISA team
8 changes: 8 additions & 0 deletions setup/conda/setup
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,11 @@ if [ ! -e "$CONDA/mesalib" ]; then
# directory to be used during compilation but not during execution.
"$CONDA/bin/mamba" run python "$CASA_SRC/casa-distro/setup/conda/extract_mesalib.py" "$CONDA/mesalib"
fi

if [ ! -e "$CASA/brainvisa-forge" ]; then
cd "$CASA_DISTRO_SRC/setup/conda/rattler-build"
for d in *; do
rattler-build build -r $d --output-dir "$CASA/brainvisa-forge"
done
conda config --env --add channels "$CASA/brainvisa-forge"
fi
7 changes: 0 additions & 7 deletions setup/conda/setup_conda
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ sh "$CASA/$installer" -u -b -p "$CONDA"
export conda="$CONDA/bin/mamba"
export conda_install="-y"

# Due to an incompatibility between conda an mamba (seen on August 23th, 2023),
# force the version of conda and conda-build until a patch is released on mamba
# (code is already patched on github, current mamba version is 1.4.9).
#"$conda" install -y 'conda=23.5.2' 'conda-build=3.25'
# "$conda" update -y mamba
# "$conda" update -y conda mamba

# Packages always installed in an environment:
# - mesa-libgl-devel-cos7-x86_64 libglvnd-devel-cos7-x86_64 are necessary
# to build OpenGL related software such as Anatomist. I do not know if
Expand Down

0 comments on commit 26d629e

Please sign in to comment.