New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
udocker: init at 1.1.1 #34493
udocker: init at 1.1.1 #34493
Conversation
@@ -0,0 +1,35 @@ | |||
{ stdenv, fetchurl, proot, patchelf, fakechroot, runc, python, pythonPackages, coreutils }: | |||
|
|||
stdenv.mkDerivation rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use buildPythonApplication
stdenv.mkDerivation rec { | ||
|
||
version = "1.1.1"; | ||
name = "udocker-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please specify pname = "udocker";
and get rid of name
.
version = "1.1.1"; | ||
name = "udocker-${version}"; | ||
|
||
src = fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also use fetchFromGitHub
.
substituteInPlace udocker.py --replace /usr/sbin:/sbin:/usr/bin:/bin $PATH | ||
substituteInPlace udocker.py --replace /bin/chmod ${coreutils}/bin/chmod | ||
substituteInPlace udocker.py --replace /bin/rm ${coreutils}/bin/chmod | ||
substituteInPlace udocker.py --replace "autoinstall = True" "autoinstall = False" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This belongs into postPatch
.
pkgs/top-level/all-packages.nix
Outdated
@@ -17453,6 +17453,8 @@ with pkgs; | |||
testssl = callPackage ../applications/networking/testssl { }; | |||
|
|||
umurmur = callPackage ../applications/networking/umurmur { }; | |||
|
|||
udocker = callPackage ../applications/virtualization/udocker { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use pythonPackages.callPackage
here
be6fcf0
to
1e91fef
Compare
@dotlambda : thank you for your advices! I think that I fixed everything... |
Hi @bzizou, thank you for this. |
@@ -0,0 +1,34 @@ | |||
{ stdenv, fetchFromGitHub, proot, patchelf, fakechroot, runc, python, pythonPackages, coreutils }: | |||
|
|||
with pythonPackages; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better put buildPythonApplication
, simplejson
, etc. in the argument set.
homepage = https://www.gitbook.com/book/indigo-dc/udocker; | ||
license = stdenv.lib.licenses.asl20; | ||
maintainers = [ stdenv.lib.maintainers.bzizou ]; | ||
platforms = stdenv.lib.platforms.linux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop stdenv.lib.
in the 3 lines above
repo = "udocker" ; | ||
rev = "v${version}"; | ||
sha256 = "134xk7rfj0xki9znryk5qf1nsfa318ahrrsi1k6ia7kipp7i3hb4"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
@A1ve5 : even at image creation time? |
pkgs/top-level/all-packages.nix
Outdated
@@ -17453,6 +17453,8 @@ with pkgs; | |||
testssl = callPackage ../applications/networking/testssl { }; | |||
|
|||
umurmur = callPackage ../applications/networking/umurmur { }; | |||
|
|||
udocker = pythonPackages.callPackage ../applications/virtualization/udocker { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is better suited for tools/virtualization
.
postPatch = '' | ||
substituteInPlace udocker.py --replace /usr/sbin:/sbin:/usr/bin:/bin $PATH | ||
substituteInPlace udocker.py --replace /bin/chmod ${coreutils}/bin/chmod | ||
substituteInPlace udocker.py --replace /bin/rm ${coreutils}/bin/chmod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably don't want to replace rm
by chmod
.
@GrahamcOfBorg build udocker |
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Please specify the appropriate |
@A1ve5 : checks are launched with |
But according to https://github.com/indigo-dc/udocker/blob/master/tox.ini, tox should simply call |
@dotlambda our jenkins is running: nosetests -v tests/unit_tests.py --with-xcoverage --cover-package=udocker |
@bzizou, yes, to build the images we rely on external tools like Docker. However, when one run "udocker create xyz" the image should be already in local repo and Docker isn't necessary. Not sure if that was your question. |
Tests are ok with Note that the tests are passing with just |
@GrahamcOfBorg build udocker |
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
Motivation for this change
udocker may be useful for HPC environments using NIX
This package works at image-creation-time (docker should be installed) and at runtime with at least P1 and P2 modes.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)