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

🐈 Task: Upgrade Dockerfile.pip and Dockerfile.conda #1573

Open
GemmaTuron opened this issue Feb 27, 2025 · 3 comments
Open

🐈 Task: Upgrade Dockerfile.pip and Dockerfile.conda #1573

GemmaTuron opened this issue Feb 27, 2025 · 3 comments

Comments

@GemmaTuron
Copy link
Member

GemmaTuron commented Feb 27, 2025

Summary

The template files to build Docker images of ersilia models, stored in dockerfiles/... need to be refactored:

They have a bunch of copy files operations that might or might not be needed and specially the examples files being copied now are hardcoded into input.csv and output.csv, whereas we are looking at allowing only {api_name}_input.csv and {api_name}_output.csv

Objective(s)

Ensure the files are correct

Documentation

No response

@GemmaTuron
Copy link
Member Author

Related to this, no image can now be pushed as ARM64 because the build fails at this step:
buildx failed with: ERROR: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c apt-get update && apt-cache search libxtst && apt-get install -y libfontconfig1 libxrender1 libxtst6 && apt-get clean && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

Since this is in all dockerfiles, it will consistently fail regardless of the models. Is this something we really need?

@GemmaTuron
Copy link
Member Author

Hi @miquelduranfrigola

Your fix does not work on ARM:

#8 30.78 Setting up ucf (3.0043+deb11u2) ...
#8 31.73 debconf: unable to initialize frontend: Dialog
#8 31.74 debconf: (TERM is not set, so the dialog frontend is not usable.)
#8 31.74 debconf: falling back to frontend: Readline
#8 31.74 debconf: unable to initialize frontend: Readline
#8 31.74 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/aarch64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
#8 31.74 debconf: falling back to frontend: Teletype
#8 32.07 Setting up libx11-6:arm64 (2:1.7.2-1+deb11u2) ...
#8 32.08 Setting up libxrender1:arm64 (1:0.9.10-1) ...
#8 32.08 Setting up fontconfig-config (2.13.1-4.2) ...
#8 32.98 debconf: unable to initialize frontend: Dialog
#8 32.98 debconf: (TERM is not set, so the dialog frontend is not usable.)
#8 32.98 debconf: falling back to frontend: Readline
#8 32.98 debconf: unable to initialize frontend: Readline
#8 32.98 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/aarch64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
#8 32.98 debconf: falling back to frontend: Teletype
#8 37.29 Setting up libfontconfig1:arm64 (2.13.1-4.2) ...
#8 37.30 Processing triggers for libc-bin (2.31-13+deb11u11) ...
#8 37.35 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#8 37.73 Segmentation fault (core dumped)
#8 37.75 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#8 38.13 Segmentation fault (core dumped)
#8 38.13 dpkg: error processing package libc-bin (--configure):
#8 38.14  installed libc-bin package post-installation script subprocess returned error exit status 139
#8 38.15 Errors were encountered while processing:
#8 38.15  libc-bin
#8 38.30 E: Sub-process /usr/bin/dpkg returned an error code (1)
#8 ERROR: process "/dev/.buildkit_qemu_emulator /bin/sh -c apt-get update &&     ARCH=$(dpkg --print-architecture) &&     if [ \"$ARCH\" = \"amd64\" ] || [ \"$ARCH\" = \"i386\" ]; then         apt-get install -y libfontconfig1 libxrender1 libxtst6;     else         apt-get install -y libfontconfig1 libxrender1;     fi &&     apt-get clean && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100
------
 > [4/5] RUN apt-get update &&     ARCH=$(dpkg --print-architecture) &&     if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then         apt-get install -y libfontconfig1 libxrender1 libxtst6;     else         apt-get install -y libfontconfig1 libxrender1;     fi &&     apt-get clean && rm -rf /var/lib/apt/lists/*:
32.98 debconf: unable to initialize frontend: Readline
32.98 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/aarch64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
32.98 debconf: falling back to frontend: Teletype
37.29 Setting up libfontconfig1:arm64 (2.13.1-4.2) ...
37.30 Processing triggers for libc-bin (2.31-13+deb11u11) ...
37.35 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
37.73 Segmentation fault (core dumped)
37.75 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
38.13 Segmentation fault (core dumped)
: Sub-process /usr/bin/dpkg returned an error code (1)
------
Dockerfile:7
--------------------
   6 |     
   7 | >>> RUN apt-get update && \
   8 | >>>     ARCH=$(dpkg --print-architecture) && \
   9 | >>>     if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i[386](https://github.com/ersilia-os/eos5axz/actions/runs/13590837834/job/37996351022#step:11:392)" ]; then \
  10 | >>>         apt-get install -y libfontconfig1 libxrender1 libxtst6; \
  11 | >>>     else \
  12 | >>>         apt-get install -y libfontconfig1 libxrender1; \
  13 | >>>     fi && \
  14 | >>>     apt-get clean && rm -rf /var/lib/apt/lists/*
  15 |     
--------------------
ERROR: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c apt-get update &&     ARCH=$(dpkg --print-architecture) &&     if [ \"$ARCH\" = \"amd64\" ] || [ \"$ARCH\" = \"i386\" ]; then         apt-get install -y libfontconfig1 libxrender1 libxtst6;     else         apt-get install -y libfontconfig1 libxrender1;     fi &&     apt-get clean && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

@GemmaTuron
Copy link
Member Author

 > [ 5/10] RUN apt-get install -y libfontconfig1:
18.65 debconf: unable to initialize frontend: Readline
18.65 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/aarch64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
18.65 debconf: falling back to frontend: Teletype
23.15 Setting up libfontconfig1:arm64 (2.13.1-4.2) ...
23.15 Processing triggers for libc-bin (2.31-13+deb11u11) ...
23.21 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
23.67 Segmentation fault (core dumped)
23.69 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
24.07 Segmentation fault (core dumped)
: Sub-process /usr/bin/dpkg returned an error code (1)

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

No branches or pull requests

1 participant