!fXpAvneDgyJuYMZSwO:nixos.org

Nix Data Science

270 Members
57 Servers

Load older messages


SenderMessageTime
10 Jul 2023
@glepage:matrix.orgGaétan Lepage
In reply to @trexd:matrix.org
Well currently updating flax is marked as broken on nixpkgs because it requires orbax to be built. I've started packaging orbax; however it requires a newer version of Jax than what is currently available on nixpkgs. Seems like people are working on it over here https://github.com/NixOS/nixpkgs/pull/227145 but it's stalled because of the changes breaking a lot of packages. I was wondering what the best way to insert myself in this process to help out in getting an update to jax merged so I can fix the state of the flax pacakge.
Hi ! I'm the dumb guy at the origin of this PR.
Indeed, we are struggling hard to get this through. A lot of problems have been tackled already. First and foremost, all of the packages (jax, jaxlib, jaxlibWithCuda) build fine now.
However, a few existing packages are broken by this update.
There are only 2: numpyro and tensorflow-datasets.
13:18:52
@glepage:matrix.orgGaétan LepageI am only targetting 0.4.12 with this PR because 0.4.13 brings yet new issues (related to jax's dependencies)13:19:34
@glepage:matrix.orgGaétan LepageHonestly, it is kind of a nightmare ^^13:19:49
@trexd:matrix.org@trexd:matrix.orgYeah it seems like it. Ya'll are doing excellent work though :D17:45:14
@peddie:matrix.orgpeddiewelcome! I've had some luck (with jbedo's help) setting up R development environments with flakes in the past year. feel free to ping me about it; I think nix is underused in the R world!22:11:53
11 Jul 2023
@brodriguesco:matrix.orgBruno Rodrigues thanks peddie! actually I was exactly going to be asking this: should I use flakes for this? and another question: have you written down some of this into a guide ? 05:31:26
@jb:vk3.wtfjbedothe decision to use flakes is orthogonal to R, i use it and find it useful but it does have limitiations and are somewhat controversial05:39:21
@jb:vk3.wtfjbedoregardless of using flakes or not, focusing on understanding core nix will go a long way05:43:30
@peddie:matrix.orgpeddieI've not written much down as it's just what I have managed to scrape together, and I don't have any blog or commit bits to nixpkgs. but there are examples in projects on github, like https://github.com/peddie/solar-api/blob/master/flake.nix05:55:52
@peddie:matrix.orgpeddie as to whether you should use flakes: not really sure, I just happened to go that route 05:56:25
@brodriguesco:matrix.orgBruno Rodriguesvery interesting thanks! I’m still in exploration phase, and am reading lots of docs currently. Already managed to drop into a nix interactive shell with R and some packages. But I’m looking more into it to see if I could build some R package that would make it easy to essentially set up, for each new project one starts, an dev environment using nix06:42:52
@brodriguesco:matrix.orgBruno Rodriguesyesterday I read about flakes, so I was wondering if and what was the consensus on them :)06:43:36
@brodriguesco:matrix.orgBruno Rodrigueswhat would you say is the biggest benefit of using flakes over not using them?06:44:02
@peddie:matrix.orgpeddieOK, it sounds a bit like templates (for setting up a dev env)?07:01:43
@peddie:matrix.orgpeddieI think there is emphatically no consensus on flakes07:01:50
@brodriguesco:matrix.orgBruno Rodriguesok07:03:15
@brodriguesco:matrix.orgBruno Rodrigues I’d like to have something like setup_env("4.2.1", c("dplyr", "tidyr", "janitor"), ide = "rstudio") that would create a default.nix and build the environment. Then, users would be advised to go to the environment and start rstudio from there, so that they could work in that new environment shipping that specific version of R and packages 07:06:04
@peddie:matrix.orgpeddieah, I see, you want to configure it from an R session different to the one you want to use for development?10:10:10
@brodriguesco:matrix.orgBruno Rodriguesyes, because I want to build something that R users could use with as little friction as possible10:12:48
@brodriguesco:matrix.orgBruno Rodriguesand R users are really used to do everything from the R session, not so much from a cli tool 10:13:04
@brodriguesco:matrix.orgBruno Rodriguessomething that would mimic renv in a sense, but with nix instead (and nix would even go further, as it would even provide a separate R installation and potentielly RStudio as well)10:13:48
@brodriguesco:matrix.orgBruno Rodriguesthen that default.nix file could be used for reproducibility purposes10:14:18
@peddie:matrix.orgpeddiegot it22:13:55
12 Jul 2023
@futaki:matrix.org@futaki:matrix.org left the room.08:46:24
@brodriguesco:matrix.orgBruno Rodrigues

So I've started playing with Nix. I am trying to build an environment with R and some packages installed (inside Docker, just to avoid interfering with my system). Here is the default.nix that I'm using:

with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/e11142026e2cef35ea52c9205703823df225c947.tar.gz") {};
{
  myProject = stdenv.mkDerivation {
    name = "myProject";
    version = "1";
    src = if lib.inNixShell then null else nix;

    buildInputs = with rPackages; [
      R
      ggplot2
      knitr
    ];
  };
}

12:19:26
@brodriguesco:matrix.orgBruno Rodrigues I can drop into a nix shell using CMD nix-shell /home/renv/default.nix in the Dockerfile and then running a container 12:20:01
@brodriguesco:matrix.orgBruno Rodrigues

but when I try to build the environment first, and then drop into bash that doesn't work. So when I do

12:20:39
@brodriguesco:matrix.orgBruno Rodrigues *

but when I try to build the environment first, and then drop into bash that doesn't work. So when I do

12:20:48
@brodriguesco:matrix.orgBruno Rodrigues *

but when I try to build the environment first, and then drop into bash that doesn't work. So when I do

RUN nix-build /home/renv/default.nix
CMD ["bash"]

I get following error message

builder for '/nix/store/1csmqrnlgbyzm5kkjw2s9q348qpx3rqy-myProject.drv' failed to produce output path for output 'out' at '/nix/store/icf4fsmlcalyc2v5wiwn88x6f7xab46y-myProject'
12:21:37
@brodriguesco:matrix.orgBruno Rodriguessurely I'm missing something obvious, but can't find it 😅12:23:01

Show newer messages


Back to Room ListRoom Version: 6