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

docekr image build failed, python3.9 is not available #4

Open
jayden222 opened this issue Feb 11, 2023 · 5 comments
Open

docekr image build failed, python3.9 is not available #4

jayden222 opened this issue Feb 11, 2023 · 5 comments

Comments

@jayden222
Copy link

When building the image with Dockerfile, it occurs that "Package python3.9 is not available, but is referred to by another package."

However, if I change the python version to python3.10 or python3.11, more issues keep coming up.

@limjcst
Copy link
Collaborator

limjcst commented Feb 12, 2023

Oops

I wish the following Dockerfile work for you, which installs python3.9 from the source.
Notice that this Dockerfile does not include CIRCA's code.
You can add a COPY command into the Dockerfile or execute pip3 install circa-clue inside the container.

FROM r-base:4.0.5
RUN apt-get update \
 && apt-get install -y --no-install-recommends \
        build-essential \
        gdb lcov pkg-config \
        libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
        libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
        lzma lzma-dev tk-dev uuid-dev zlib1g-dev \
        git \
        vim \
 && rm -rf /var/lib/apt/lists/*
RUN wget -q https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz \
 && tar -xf Python-3.9.10.tgz \
 && cd Python-3.9.10 \
 && ./configure --enable-optimizations \
 && grep ssl Modules/Setup | sed 's/^#//' >> Modules/Setup.local \
 && make -j 2 \
 && make altinstall \
 && cd .. \
 && rm -r Python-3.9.10.tgz Python-3.9.10
RUN ln -s /usr/local/bin/python3.9 /usr/local/bin/python \
 && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip3
RUN pip3 install --upgrade pip 

WORKDIR /app

# installing python libraries
RUN pip3 install --no-cache-dir rpy2
COPY build/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# installing R libraries
COPY build/requirements.R .
RUN Rscript requirements.R

@limjcst
Copy link
Collaborator

limjcst commented Feb 12, 2023

A python-only Dockerfile can make things easy.
An option is to make rpy2 and pcalg optional.
However, some work is in need.

@jayden222
Copy link
Author

Thank you very much! The new dockerfile works. Maybe it could be updated to the code.

@limjcst
Copy link
Collaborator

limjcst commented Feb 13, 2023

Thank you very much! The new dockerfile works. Maybe it could be updated to the code.

Done. 9b5173b

@kkupwegoo
Copy link

Hello, how is the reproduction of this code, can you tell me? Really appreciated!

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