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

install packages to a different root directory #155

Open
glevner opened this issue Jul 25, 2022 · 3 comments
Open

install packages to a different root directory #155

glevner opened this issue Jul 25, 2022 · 3 comments

Comments

@glevner
Copy link
Contributor

glevner commented Jul 25, 2022

We need to install packages to a directory other than /usr/local, because we need to be able to access multiple VFX reference platforms without having to switch between different Docker images.

The shell scripts that build each package allow you to specify any location you want, which is a good start. But adapting the Dockerfiles to build and install all the packages to a different location is a huge headache. (For me, anyway.)

Has anybody else out there been confronted with this problem? And perhaps found a solution?

@aloysbaillet
Copy link
Contributor

You can use the Conan packages to install the available packages anywhere. Building multiple parallel VFX platforms in the same image would be very hard without Conan. Unfortunately not all VFX packages are available yet in Conan.

@glevner
Copy link
Contributor Author

glevner commented Jul 26, 2022

Thanks for that, Aloys. When you say "the Conan packages", do you mean one can use the Conan recipes provided by ASWF to do this? Or do you mean to use packages from Conan Center?

@jfpanisset
Copy link
Contributor

The direction in which the containers are evolving is that packages will all be built as Conan packages, and then assembled into runnable containers: we're not quite there yet, but getting there.

Starting with VFX 2023, there's a script in scripts/common/install_conanpackages.sh which installs all the Conan packages called for by a container, and if you look in python/aswfdocker/data/ci-image-dockerfile.jinja2 you will find the template for the code installing those packages in /usr/local:

{% if name != "common" %}
RUN --mount=type=cache,target=/opt/conan_home/d \
    --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \
    /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION}
{% else %}
RUN --mount=type=cache,target=/opt/conan_home/d \
    --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \
    /tmp/install_conanpackages.sh /usr/local ci_common${CI_COMMON_VERSION}
{% endif %}

So you could change the destination based on the ASWF_VFXPLATFORM_VERSION variable, then:

aswfdocker dockergen

which regenerates the ci-*/Dockerfile files, and rebuild your own containers with a versioned installation destination.

Of course that only handles the Conan packages... It would definitely be better if the aswfdocker command had an option to specify the installation prefix for custom builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants