How install the requirements for odoo 17 in offical Docker
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
Research direction
Start with the Dockerfile's pip3 install -r requirements.txt step and the Odoo 17.0 requirements.txt it downloads. Reproduce the build on the Ubuntu Jammy base, then inspect the gevent, cffi, and system Python package versions shown in the error. Done means the requirements install completes successfully in the official Odoo 17 Docker build.
Written by the indexing model from the issue text.
Description
Here my Docker-File:
#Source: https://github.com/odoo/docker/blob/master/17.0/Dockerfile
FROM ubuntu:jammy
ENV LANG C.UTF-8
WORKDIR /home/odoo/addons
# Retrieve the target architecture to install the correct wkhtmltopdf package
ARG TARGETARCH
# Install dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
fonts-noto-cjk \
gnupg \
libssl-dev \
node-less \
npm \
python3-magic \
python3-num2words \
python3-odf \
python3-pdfminer \
python3-pip \
python3-phonenumbers \
python3-pyldap \
python3-qrcode \
python3-renderpm \
python3-setuptools \
python3-slugify \
python3-vobject \
python3-watchdog \
python3-xlrd \
python3-xlwt \
xz-utils && \
if [ -z "${TARGETARCH}" ]; then \
TARGETARCH="$(dpkg --print-architecture)"; \
fi; \
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
case ${TARGETARCH} in \
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=967390a759707337b46d1c02452e2bb6b2dc6d59 ;; \
"arm64") WKHTMLTOPDF_SHA=90f6e69896d51ef77339d3f3a20f8582bdf496cc ;; \
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=5312d7d34a25b321282929df82e3574319aed25c ;; \
esac \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_${WKHTMLTOPDF_ARCH}.deb \
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& GNUPGHOME="$(mktemp -d)" \
&& export GNUPGHOME \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
&& gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \
&& gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \
&& apt-get update \
&& apt-get install --no-install-recommends -y postgresql-client \
&& rm -f /etc/apt/sources.list.d/pgdg.list \
&& rm -rf /var/lib/apt/lists/*
# Install Company Certificates
COPY ./certs/*.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
#RUN awk -v cmd='openssl x509 -noout -subject' ' /BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-certificates.crt && sleep 10
# Install odoo python dependencies
RUN pip3 install setuptools wheel
RUN curl https://raw.githubusercontent.com/odoo/odoo/17.0/requirements.txt --output ./requirements.txt
RUN pip3 install -r requirements.txt && rm requirements.txt
# Install left-to-right interface for languages
RUN npm install -g rtlcss
# Clone git repositories
# RUN git clone https://github.com/odoo/odoo.git ./odoo
# Clone enterprise repository (requires enterprise account)
# RUN git clone https://user:[email protected]/odoo/enterprise.git ./enterprise
# Copy configuration file
COPY ./config/odoo.conf /etc/odoo/odoo.conf
# Run odoo
CMD ["/home/odoo/addons/odoo/odoo-bin", "-c/etc/odoo/odoo.conf"]
But when I run the install of the requirements (see the lines in my docker file with the requirement.txt), i have following error:
5.877 Collecting gevent==21.8.0
5.900 Downloading gevent-21.8.0.tar.gz (6.2 MB)
6.198 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 21.4 MB/s eta 0:00:00
9.313 Installing build dependencies: started
23.73 Installing build dependencies: finished with status 'done'
23.74 Getting requirements to build wheel: started
37.50 Getting requirements to build wheel: finished with status 'done'
37.51 Preparing metadata (pyproject.toml): started
39.43 Preparing metadata (pyproject.toml): finished with status 'error'
39.46 error: subprocess-exited-with-error
39.46
39.46 × Preparing metadata (pyproject.toml) did not run successfully.
39.46 │ exit code: 1
39.46 ╰─> [40 lines of output]
39.46 Traceback (most recent call last):
39.46 File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
39.46 main()
...
39.46 ffi = FFI()
39.46 File "/tmp/pip-build-env-ogrzgl9d/overlay/local/lib/python3.10/dist-packages/cffi/api.py", line 54, in __init__
39.46 raise Exception("Version mismatch: this is the 'cffi' package version %s, located in %r. When we import the top-level '_cffi_backend' extension module, we get version %s, located in %r. The two versions should be equal; check your installation." % (
39.46 Exception: Version mismatch: this is the 'cffi' package version 1.16.0, located in '/tmp/pip-build-env-ogrzgl9d/overlay/local/lib/python3.10/dist-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 1.15.0, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-310-x86_64-linux-gnu.so'. The two versions should be equal; check your installation.
39.46 [end of output]
39.46
39.46 note: This error originates from a subprocess, and is likely not a problem with pip.
39.47 error: metadata-generation-failed
39.47
39.47 × Encountered error while generating package metadata.
39.47 ╰─> See above for output.
39.47
39.47 note: This is an issue with the package mentioned above, not pip.
39.47 hint: See above for details.
------
failed to solve: process "/bin/sh -c pip3 install -r requirements.txt && rm requirements.txt" did not complete successfully: exit code: 1
I using Docker on Ubuntu 22.04
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from odoo/docker
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Missing PyJWT ?Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
feature request needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
-
ci-red code-regression gfx942 platform: Linux platform: Windows post-merge project: hipblaslt
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ROCm/rocm-libraries#16354 ·
Maintainers usually reply within 2 days
-
area:plugins kind:perf priority:p3 ready
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Auto-Format Suggestions job fails at setup: reviewdog/action-suggester v1.27.0 uses an action pinned by tagPossibly taken @fgogolli claimed this today. Openarea: ci priority: p2 size: S type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
finos/open-resource-broker#883 ·
Maintainers usually reply within 1 day
-
status/to triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day