-
Notifications
You must be signed in to change notification settings - Fork 49
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
docker: add namespaced builds for spack/ubuntu #4577
docker: add namespaced builds for spack/ubuntu #4577
Conversation
6b96f39
to
f23d1ab
Compare
For better or worse we've mostly done this on purpose because those scripts are meant to be run via
This should not be required if you pull down at least the latest tag during checkout, though I'm fine with also supporting a variable. |
Gotcha. I'm not sure what to do here, because removing it, the containers will definitely error.
Cool, thanks! The use case is being able to build from any git hash. Let me know what changes you'd like. |
I'm traveling today, so I won't be able to finish review til Monday. It would be interesting to know why the container errors when running python commands the intended way. Maybe there's a better way we can be doing things! |
Ah ok we can chat then! The short answer is I get a permission denied during the build and it appears to be trying to use a shell interpreter. Bon voyage! Have fun! 🧳 |
But what is trying to run the python scripts directly - |
The container is running those exact steps too (for install with autogen -> make -> make install)! So is there some other environment variable or some difference about the container (which you can see the Dockerfile there) that could lead to this? Also - I've run into this bug running the flux build for the gitlab CI recipe with Jacamar. When I'm building in different contexts with Flux it comes up fairly regularly, so (if a user could hit this too trying to install) I don't think we should ignore it. We maybe need a different strategy all together? |
I have an idea - how about I'll build a variant of the container that doesn't build, and give instruction for how to shell in and reproduce? Then you can very likely see what is going on. Or if there is something you want me to test or try I can do that too! |
Yeah, if you have instructions to reproduce that would be great! We run the build and |
OK! I'm munching on 🥑 but I'll do this right after dinner! |
Okay done (it didn't end well for the 🥑)! So here is what I did. I started with this Dockerfile: FROM ubuntu:22.04
# docker build -t vanessa/flux-framework:grondo .
# used in configure.ac
ARG FLUX_VERSION=0.42.0
ENV FLUX_VERSION=${FLUX_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -qq install -y --no-install-recommends \
automake \
libsodium-dev \
libzmq3-dev \
libczmq-dev \
libjansson-dev \
libmunge-dev \
libncursesw5-dev \
lua5.4 \
liblua5.4-dev \
liblz4-dev \
libsqlite3-dev \
uuid-dev \
libhwloc-dev \
libmpich-dev \
libs3-dev \
libevent-dev \
libarchive-dev \
python3 \
python3-dev \
python3-pip \
python3-sphinx \
libtool \
git \
build-essential \
# Flux security
libjson-glib-1.0.0 \
libjson-glib-dev \
libpam-dev && \
ldconfig && \
rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/flux-framework/flux-core /code
WORKDIR /code
# This has added support for flux version from environment (above)
COPY ./configure.ac /code/configure.ac
RUN ./autogen.sh && \
./configure --prefix=/usr/local --without-python # && \
# make && \
# make install && \
# ldconfig
# Ensure we can find Python
# RUN ln -s /usr/bin/python3 /usr/bin/python
ENTRYPOINT ["/bin/bash"] And this is pretty much the same as the one here. Note that I've commented out the make commands (this will be something that you can run, and I'll show that after) and I've also disabled python $ docker build -t vanessa/flux-framework:grondo . Okay so here are... 🚧 Instructions for reproducing! 🚧 Pull the container: $ docker pull vanessa/flux-framework:grondo Shell inside: $ docker run -it vanessa/flux-framework:grondo And you'll be in the root of flux at /code! Now just run make: $ make And after some very good compiling (insert compiler noises here) it should reproduce: make[1]: Entering directory '/code/etc'
GEN completions/flux
GEN flux/help.d/core.json
/bin/bash: line 2: ./gen-cmdhelp.py: Permission denied
make[1]: *** [Makefile:914: flux/help.d/core.json] Error 126
make[1]: Leaving directory '/code/etc'
make: *** [Makefile:591: all-recursive] Error 1
root@26a883a58e50:/code# |
Thanks!
Ah, yeah, I bet this is the problem. I don't think you can configure and use flux-core without python. We should probably remove that option! 🤦 |
Ok I'll prepare a branch to test this out! |
This PR now is dependent on #4584. We would want to update the Python install there, then I'll come back here and remove the |
Just testing these locally and will update the branch soon! |
f23d1ab
to
56a8a65
Compare
okay updated with changes! I don't know why cmdhelp is showing up as an empty file - I just removed the hashbang locally. We will see if it's just a GitHub floop. |
They show as empty because the permissions have changed. Since they are run as |
ah do you want me to change back? What should it be? chmod... ? |
Sure, they were previously |
56a8a65
to
d73c268
Compare
ok all set! Apparently I am an old dog 🐶 that does not learn new tricks - I made this "adding" mistake before, it's like in one 👂 and out the other! I hope I get it right next time. |
Haha, no problem! If it helps, even Git's own documentation requires present tense, imperative mood. |
okay we are green! 🍏 📗 🟢 💚 I skipped the salad nobody wants the salad lol. |
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.
Yeah, who wants a big bowl of plant leafs?
LGTM!
I'll set the mwp flag! |
It said it couldn't be embarked so I clicked the suggested button to update it. |
That won't work because it creates a merge commit. You'll have to force-push your branch again rebased on current master. Sorry! |
Why is that option enabled in settings if it results in an undesired outcome ? 🤔 |
0f0bb9c
to
d73c268
Compare
ah because update with rebase is OK? |
We currently build one set of containers that are spack focused, and ideally we should provide this along with more vanilla (e.g., ubuntu) builds. This update will move the spack builds into a spack subdirectory and add two ubuntu builds - one a base container, and the other that just runs a make check-prep to run some tests. This ubuntu base could be used for other contexts of testing, and I think after the python work is integrated we would migrate the container there into this directory too. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
d73c268
to
b06fdb9
Compare
Yeah, I suppose. Though I don't think there was a way to disable it until recently (it isn't enabled in settings, it is just not disabled in settings 😆 ) |
Codecov Report
@@ Coverage Diff @@
## master #4577 +/- ##
=======================================
Coverage 83.36% 83.36%
=======================================
Files 409 409
Lines 68548 68548
=======================================
Hits 57148 57148
Misses 11400 11400 |
Actually I didn't see a way to disable the "Update" button on quick perusal of settings. Do you know where it is? |
Oh, we don't have that configured. 🤷 |
That’s super weird!! |
We currently build one set of containers that are spack focused, and ideally we should provide this along with m ore vanilla (e.g., ubuntu) builds. This update will move the spack builds into a spack subdirectory and add two ubuntu builds - one a base container, and the other that just runs a make check-prep to run some tests. This ubuntu base could be used for other contexts
of testing, and I think after the python work is integrated we would migrate the container there into this directory too. Some notes:
FLUX_VERSION
otherwise we get a wonky build error. It's hard coded now an eventually can come from a variable (e.g. release)Also just noticed ubuntu bases are a lot faster than spack!
Signed-off-by: vsoch vsoch@users.noreply.github.com