llnl / llnl/spot2_container

Docker build fails (Python version not compatible) + Workaround

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hi!

I cloned `cc7f104d60cbdda9391375bdcce7d9d7c3b51a49` and tried to run the Docker build.
This attempt resulted in this error:
```
Step 26/53 : RUN /usr/gapps/spot/hatchet_install/install.sh
---> Running in fb9d906a6462
running build_ext
building 'hatchet.cython_modules.libs.reader_modules' extension
creating build
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/hatchet
creating build/temp.linux-x86_64-cpython-311/hatchet/cython_modules
gcc -pthread -B /opt/conda/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/include/python3.11 -c hatchet/cython_modules/reader_modules.c -o build/temp.linux-x86_64-cpython-311/hatchet/cython_modules/reader_modules.o
hatchet/cython_modules/reader_modules.c:198:12: fatal error: longintrepr.h: No such file or directory
198 | #include "longintrepr.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
```
Some research got me to this issue (`Fails to build on Python 3.11 - longintrepr.h: No such file or directory`):
https://github.com/aio-libs/aiohttp/issues/6600

So I checked the Python version. The Python version of the latest `jupyter/minimal-notebook` is `3.11.4`, so I changed
```
FROM jupyter/minimal-notebook
```
to
```
FROM jupyter/minimal-notebook:python-3.10
```
in the `Dockerfile`.
This made it work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the base image declaration in Dockerfile and compare its Python version with the failing build log. Run the Docker build to reproduce the longintrepr.h error, then verify that the build completes using a compatible Python base image.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, devops
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.