Automated builds and robossembler cache update
This commit is contained in:
commit
20e99e027a
4 changed files with 39 additions and 182 deletions
34
.gitlab-ci.yml
Normal file
34
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
stages:
|
||||
- build
|
||||
- push
|
||||
|
||||
variables:
|
||||
CACHIX_CACHE_NAME: robossembler
|
||||
|
||||
default:
|
||||
image: nixpkgs/cachix-flakes:nixos-23.11
|
||||
before_script:
|
||||
- mkdir -p /etc/nix
|
||||
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||
- cachix use "$CACHIX_CACHE_NAME"
|
||||
|
||||
general-packages:
|
||||
stage: build
|
||||
inherit:
|
||||
default: [before_script, image]
|
||||
script:
|
||||
- cachix watch-exec robossembler -- nix develop .#all -c echo "General Packages is BUILT"
|
||||
|
||||
ros-packages:
|
||||
stage: build
|
||||
inherit:
|
||||
default: [before_script, image]
|
||||
script:
|
||||
- cachix watch-exec robossembler -- nix develop .#ros -c echo "ROS environment is BUILT"
|
||||
|
||||
perception-packages:
|
||||
stage: build
|
||||
inherit:
|
||||
default: [before_script, image]
|
||||
script:
|
||||
- cachix watch-exec robossembler -- nix develop .#perception -c echo "PERCEPTION packages is BUILT"
|
10
flake.nix
10
flake.nix
|
@ -55,7 +55,6 @@
|
|||
pysdf = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/pysdf { };
|
||||
pytorch3d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/pytorch3d { };
|
||||
mayo = pkgs.libsForQt5.callPackage ./pkgs/misc/mayo { };
|
||||
darknet = pkgs.callPackage ./pkgs/misc/darknet { };
|
||||
fstl = pkgs.libsForQt5.callPackage ./pkgs/misc/fstl { };
|
||||
open3d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/open3d { };
|
||||
unified-planning = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/unified-planning { };
|
||||
|
@ -65,7 +64,6 @@
|
|||
ansitable = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/ansitable { };
|
||||
megapose6d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/megapose6d { inherit webdataset; };
|
||||
spatialmath = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/spatialmath { inherit ansitable; };
|
||||
slic3r = pkgs.callPackage ./pkgs/misc/slic3r { };
|
||||
in
|
||||
{
|
||||
inherit pkgs;
|
||||
|
@ -78,10 +76,12 @@
|
|||
};
|
||||
|
||||
packages = {
|
||||
inherit mayo blender bpy pysdf fstl unified-planning slic3r megapose6d test-script pytorch3d;
|
||||
gazebo = ros.humble.gazebo;
|
||||
inherit mayo pysdf fstl unified-planning test-script;
|
||||
zoz = pkgs.btop;
|
||||
};
|
||||
|
||||
devShells.ci = pkgs.mkShell { buildInputs = [ pkgs.jq ]; };
|
||||
|
||||
devShells.ros =
|
||||
pkgs.mkShell {
|
||||
buildInputs = (with humble-overrided; [
|
||||
|
@ -121,7 +121,7 @@
|
|||
};
|
||||
|
||||
devShells.all = pkgs.mkShell {
|
||||
packages = [ mayo blender bpy pysdf fstl darknet slic3r ];
|
||||
packages = [ mayo blender bpy pysdf fstl ];
|
||||
};
|
||||
|
||||
devShells.perception =
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, cudatoolkit
|
||||
, opencv4
|
||||
, cudaPackages
|
||||
, addOpenGLRunpath
|
||||
, enableCuda ? false
|
||||
, cudaSupport ? true
|
||||
, linkFarm
|
||||
, symlinkJoin
|
||||
, autoPatchelfHook
|
||||
}:
|
||||
let
|
||||
cudaStub = linkFarm "cuda-stub" [{
|
||||
name = "libcuda.so.1";
|
||||
path = "${cudatoolkit}/lib/stubs/libcuda.so";
|
||||
}];
|
||||
|
||||
cudaEnv = symlinkJoin {
|
||||
name = "darknet-cuda-env";
|
||||
paths = with cudaPackages; [];
|
||||
postBuild = ''
|
||||
ln -s ${addOpenGLRunpath.driverLink}/lib/libcuda.so $out/lib
|
||||
ln -s lib $out/lib64
|
||||
'';
|
||||
};
|
||||
|
||||
cuda-opencv = opencv4.override {
|
||||
enableCuda = true;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "darknet";
|
||||
version = "unstable";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AlexeyAB";
|
||||
repo = "darknet";
|
||||
rev = "0faed3e60e52f742bbef43b83f6be51dd30f373e";
|
||||
hash = "sha256-6qY1QG7Pq/d5W+BvnMD2pFdBVWdvmCP0spUAjyGWB8M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
opencv4
|
||||
autoPatchelfHook
|
||||
cudaPackages.autoAddOpenGLRunpathHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cudaPackages.cudnn
|
||||
cudatoolkit
|
||||
cudaEnv
|
||||
];
|
||||
|
||||
cmakeFlags =
|
||||
(lib.optionals enableCuda [ "CUDA_PATH=${cudatoolkit}" ]) ++ [
|
||||
"GPU=1"
|
||||
"CUDNN=1"
|
||||
"OPENCV=1"
|
||||
"AVX=1"
|
||||
"OPENMP=1"
|
||||
"LIBSO=0"
|
||||
"ARCH= -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61"
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
mkdir build_release
|
||||
cd build_release
|
||||
cmake ..
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export LD_LIBRARY_PATH=${cudaStub}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
||||
cmake --build . --target install --parallel 8
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp darknet $out/bin
|
||||
'';
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )";
|
||||
homepage = "https://github.com/AlexeyAB/darknet";
|
||||
license = with licenses; [ ];
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, perl, makeWrapper
|
||||
, makeDesktopItem, which, perlPackages, boost
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "unstable";
|
||||
pname = "slic3r";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "slic3r";
|
||||
repo = "Slic3r";
|
||||
rev = "026c1380e0ad12176dd2fc8cdf8f6f181deeb071";
|
||||
hash = "sha256-4ss6Kau7tx2WRkhFTvoeOUb65X1ka+8TsFtDI40/0Mo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper which ];
|
||||
buildInputs =
|
||||
[boost] ++
|
||||
(with perlPackages; [ perl
|
||||
EncodeLocale MathClipper ExtUtilsXSpp
|
||||
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
||||
IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
|
||||
ExtUtilsMakeMaker OpenGL WxGLCanvas ModuleBuild LWP
|
||||
ExtUtilsCppGuess ModuleBuildWithXSpp ExtUtilsTypemapsDefault
|
||||
DevelChecklib locallib
|
||||
]);
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "slic3r";
|
||||
exec = "slic3r";
|
||||
icon = "slic3r";
|
||||
comment = "G-code generator for 3D printers";
|
||||
desktopName = "Slic3r";
|
||||
genericName = "3D printer tool";
|
||||
categories = [ "Development" ];
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
# In nix ioctls.h isn't available from the standard kernel-headers package
|
||||
# on other distributions. As the copy in glibc seems to be identical to the
|
||||
# one in the kernel, we use that one instead.
|
||||
sed -i 's|"/usr/include/asm-generic/ioctls.h"|<asm-generic/ioctls.h>|g' xs/src/libslic3r/GCodeSender.cpp
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export SLIC3R_NO_AUTO=true
|
||||
export LD=$CXX
|
||||
export PERL5LIB="./xs/blib/arch/:./xs/blib/lib:$PERL5LIB"
|
||||
substituteInPlace Build.PL \
|
||||
--replace "0.9918" "0.9923" \
|
||||
--replace "eval" ""
|
||||
pushd xs
|
||||
perl Build.PL
|
||||
perl Build
|
||||
popd
|
||||
perl Build.PL --gui
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/slic3r/"
|
||||
cp -r * "$out/share/slic3r/"
|
||||
wrapProgram "$out/share/slic3r/slic3r.pl" \
|
||||
--prefix PERL5LIB : "$out/share/slic3r/xs/blib/arch:$out/share/slic3r/xs/blib/lib:$PERL5LIB"
|
||||
mkdir -p "$out/bin"
|
||||
ln -s "$out/share/slic3r/slic3r.pl" "$out/bin/slic3r"
|
||||
mkdir -p "$out/share/pixmaps/"
|
||||
ln -s "$out/share/slic3r/var/Slic3r.png" "$out/share/pixmaps/slic3r.png"
|
||||
mkdir -p "$out/share/applications"
|
||||
cp "$desktopItem"/share/applications/* "$out/share/applications/"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "G-code generator for 3D printers";
|
||||
longDescription = ''
|
||||
Slic3r is the tool you need to convert a digital 3D model into printing
|
||||
instructions for your 3D printer. It cuts the model into horizontal
|
||||
slices (layers), generates toolpaths to fill them and calculates the
|
||||
amount of material to be extruded.'';
|
||||
homepage = "https://slic3r.org/";
|
||||
license = licenses.agpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue