Skip to content
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

perf: upgrade to latest conda, conda-build, and boa versions #872

Merged
merged 6 commits into from
May 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ RUN yum install -y mesa-libGL-devel \
# This changes root's .condarc which ENTRYPOINT copies to /home/conda/.condarc later.
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda config \
--prepend channels defaults \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use install-and-set-up-conda.sh to install in this dockerfile? Otherwise this risks getting out-of-sync with how it's being installed everywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should do that. But let us do that in a separate PR. There are some steps in this dockerfile that I do not fully understand, such that it would need more time. For now, I just want to upgrade the conda and mamba versions as quickly as possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. The base linux-anvil image used here has a lot of moving parts as well; I have a local branch that completely rewrites the dockerfile for simplicity but that can be for later.

--prepend channels bioconda \
--prepend channels conda-forge \
--prepend channels defaults \
--prepend channels bioconda \
--prepend channels conda-forge \
&& \
{ conda config --remove repodata_fns current_repodata.json 2> /dev/null || true ; } && \
conda config --prepend repodata_fns repodata.json && \
Expand All @@ -38,8 +38,8 @@ RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && \
pip wheel . && \
mkdir - /opt/bioconda-utils && \
cp ./bioconda_utils-*.whl \
./bioconda_utils/bioconda_utils-requirements.txt \
/opt/bioconda-utils/ \
./bioconda_utils/bioconda_utils-requirements.txt \
/opt/bioconda-utils/ \
&& \
chgrp -R lucky /opt/bioconda-utils && \
chmod -R g=u /opt/bioconda-utils
Expand All @@ -49,15 +49,15 @@ COPY --from=build /opt/bioconda-utils /opt/bioconda-utils
RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && \
# Make sure we get the (working) conda we want before installing the rest.
sed -nE \
'/^conda([><!=~ ].+)?$/p' \
/opt/bioconda-utils/bioconda_utils-requirements.txt \
| xargs -r conda install --yes && \
conda install --yes --file /opt/bioconda-utils/bioconda_utils-requirements.txt && \
'/^conda([><!=~ ].+)?$/p' \
/opt/bioconda-utils/bioconda_utils-requirements.txt \
| xargs -r mamba install --yes && \
mamba install --yes --file /opt/bioconda-utils/bioconda_utils-requirements.txt && \
pip install --no-deps --find-links /opt/bioconda-utils bioconda_utils && \
conda clean --yes --index --tarballs && \
mamba clean --yes --index --tarballs && \
# Find files that are not already in group "lucky" and change their group and mode.
find /opt/conda \
\! -group lucky \
-exec chgrp --no-dereference lucky {} + \
\! -type l \
-exec chmod g=u {} +
\! -group lucky \
-exec chgrp --no-dereference lucky {} + \
\! -type l \
-exec chmod g=u {} +