The test failure is because you are using rubin-env 0.6.0 with Science Pipelines v22_0_1 instead of rubin-env 0.4.3.
In addition, here are some more suggestions:
You shouldn’t need to conda install eups after installing rubin-env unless you’re trying to ensure that the latest version is present, as rubin-env has always included eups.
If you are executing newinstall.sh with bash, you don’t need to chmod 755 it.
I don’t think you need to set EUPS_SHELL. It should already be set to sh, and there’s no difference between that and bash to the code.
If you eups distrib install afw, it will install all of its dependencies as well, so you shouldn’t need the other two commands.
In general, reducing the number of layers in the container is desirable, so combining RUN commands like echo and chmod may be beneficial.
Yeah, this is showing a lot of my process getting to this point, and making debugging easier. The EUPS_SHELL stuff was from me struggling for a long time to get the shell to automatically source a correct set of startup files (conda or LSST) for the various kinds of shell (login, interactive, non-interactive, sh vs bash); it’s very tricky to get that right and avoid having to source LSST.sh at the beginning of each RUN line.
(Also, since your build process is so time-consuming, I didn’t want to edit my Dockerfile too much!! )
Officially it’s the version in the appropriately tagged version of newinstall.sh: lsst/newinstall.sh at 22.0.1 · lsst/lsst · GitHub, but this should match what is in the CONDA_ENV comment in the tag file.
Unfortunately, for these early versions we did not precisely follow semantic versioning rules, so 0.6.0 is not fully substitutable for 0.4.3. We hope to do better in the future.
That last script seems a bit iffy as I don’t think you’re activating the downloaded conda before executing commands. With a fresh miniconda and environment, even with the intel channel and (unnecessary) pre-installation of pip/numpy/scipy, I can’t reproduce your issue, as I get:
(myenv) lsst-devl02:~/stack $ conda list deprecated
# packages in environment at /home/ktlim/stack/conda/envs/myenv:
#
# Name Version Build Channel
deprecated 1.2.10 pyh9f0ad1d_0 conda-forge
(myenv) lsst-devl02:~/stack $ conda list rubin-env
# packages in environment at /home/ktlim/stack/conda/envs/myenv:
#
# Name Version Build Channel
rubin-env 0.4.3 ha770c72_4 conda-forge
PPS I’m not a conda expert at all – I don’t really understand how I can have rubin-env of the desired version from the desired channel but not the correct build.
# conda install rubin-env=0.4.3=ha770c72_4
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /opt/conda/envs/myenv
added / updated specs:
- rubin-env==0.4.3=ha770c72_4
The following packages will be downloaded:
package | build
---------------------------|-----------------
click-7.1.2 | pyh9f0ad1d_0 64 KB conda-forge
deprecated-1.2.10 | pyh9f0ad1d_0 11 KB conda-forge
galsim-2.2.5 | py38h3878127_0 3.0 MB conda-forge
pandas-1.2.5 | py38h1abd341_0 12.1 MB conda-forge
rubin-env-0.4.3 | ha770c72_4 7 KB conda-forge
sqlite-3.34.0 | h74cdb3f_0 1.4 MB conda-forge
------------------------------------------------------------
Total: 16.6 MB
The following packages will be UPDATED:
rubin-env 0.4.3-ha770c72_0 --> 0.4.3-ha770c72_4
The following packages will be SUPERSEDED by a higher-priority channel:
click conda-forge/linux-64::click-8.0.1-py3~ --> conda-forge/noarch::click-7.1.2-pyh9f0ad1d_0
sqlite intel::sqlite-3.35.5-hb9a14ef_1 --> conda-forge::sqlite-3.34.0-h74cdb3f_0
The following packages will be DOWNGRADED:
deprecated 1.2.12-pyh44b312d_0 --> 1.2.10-pyh9f0ad1d_0
galsim 2.3.2-py38h260733e_1 --> 2.2.5-py38h3878127_0
pandas 1.3.1-py38h1abd341_0 --> 1.2.5-py38h1abd341_0
Downloading and Extracting Packages
pandas-1.2.5 | 12.1 MB | ############################################################################################################################################################### | 100%
galsim-2.2.5 | 3.0 MB | ############################################################################################################################################################### | 100%
click-7.1.2 | 64 KB | ############################################################################################################################################################### | 100%
sqlite-3.34.0 | 1.4 MB | ############################################################################################################################################################### | 100%
deprecated-1.2.10 | 11 KB | ############################################################################################################################################################### | 100%
rubin-env-0.4.3 | 7 KB | ############################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: sed: command not found
bash: grep: command not found
Those final complaints are… weird… as though the PATH has gotten messed up, but once the command completes, my shell path is fine -
I’ve merged DM-31235, so the master version of newinstall.sh should now accept a specified conda environment if it already exists without installing anything.
Unfortunately this caused problems with building our binary tarballs, so I had to back it out. I will reopen the ticket and investigate further how to do this properly.