https://pantsbuild.org/ logo
#general
Title
# general
e

echoing-london-29138

01/18/2022, 5:17 PM
Hi Here, I’m trying to use pants on a docker, but I keep to get this strange error:
Copy code
#12 0.335 Bootstrapping Pants using /usr/bin/python3.8
#12 0.339 Creating the virtualenv PEX.
#12 0.340 Downloading the Pex PEX.
#12 0.348   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#12 0.348                                  Dload  Upload   Total   Spent    Left  Speed
100   640  100   640    0     0   6736      0 --:--:-- --:--:-- --:--:--  6666
100 3609k  100 3609k    0     0  5631k      0 --:--:-- --:--:-- --:--:-- 5631k
#12 1.033 SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.62/pex> verified.
#12 4.946 Installing pantsbuild.pants==2.9.0rc2 into a virtual environment at /root/.cache/pants/setup/bootstrap-Linux-aarch64/2.9.0rc2_py38
#12 5.675 created virtual environment CPython3.8.10.final.0-64 in 384ms
#12 5.675   creator CPython3Posix(dest=/root/.cache/pants/setup/bootstrap-Linux-aarch64/pants.giAPtK/install, clear=False, no_vcs_ignore=False, global=False)
#12 5.675   seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
#12 5.675     added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
#12 5.675   activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
#12 6.283 Requirement already satisfied: pip in /root/.cache/pants/setup/bootstrap-Linux-aarch64/pants.giAPtK/install/lib/python3.8/site-packages (21.1.2)
#12 6.381 Collecting pip
#12 6.434   Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
#12 6.515 Requirement already satisfied: setuptools<58 in /root/.cache/pants/setup/bootstrap-Linux-aarch64/pants.giAPtK/install/lib/python3.8/site-packages (57.0.0)
#12 6.689 Collecting setuptools<58
#12 6.711   Downloading setuptools-57.5.0-py3-none-any.whl (819 kB)
#12 6.766 Installing collected packages: setuptools, pip
#12 6.766   Attempting uninstall: setuptools
#12 6.766     Found existing installation: setuptools 57.0.0
#12 6.811     Uninstalling setuptools-57.0.0:
#12 6.817       Successfully uninstalled setuptools-57.0.0
#12 7.094   Attempting uninstall: pip
#12 7.094     Found existing installation: pip 21.1.2
#12 7.250     Uninstalling pip-21.1.2:
#12 7.258       Successfully uninstalled pip-21.1.2
#12 7.752 Successfully installed pip-21.3.1 setuptools-57.5.0
#12 8.153 ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.9.0rc2 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0)
#12 8.153 ERROR: No matching distribution found for pantsbuild.pants==2.9.0rc2
Here my docker file :
Copy code
# GET the Ubuntu Image from public.ecr.aws/ubuntu/ubuntu (ubuntu oficial ECR) to avoid Docker Hub Limits
FROM public.ecr.aws/ubuntu/ubuntu:20.04

RUN apt-get update

ENV PYTHONUNBUFFERED 1
ARG DEBIAN_FRONTEND=noninteractive

ENV SRC_PATH=./mlp_backend
ENV CONTAINER_CODE_PATH=/code
ENV CONTAINER_BUILD_PATH=/build
RUN apt-get update && apt-get --assume-yes install \
	git \
	xmlsec1 \
	libpq-dev \
	python3-setuptools \
	poppler-utils \
	build-essential \
	python3-dev \
	python3-pip \
	python3-setuptools \
	python3-wheel \
	python3-cffi \
	python3-distutils \
	libcairo2 \
	libpango-1.0-0 \
	libpangocairo-1.0-0 \
	libgdk-pixbuf2.0-0 \
	libffi-dev \
	libcurl4-openssl-dev \
	libssl-dev \
	shared-mime-info \
	supervisor \
	curl \
	--no-install-recommends \
	&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN mkdir $CONTAINER_BUILD_PATH
COPY ./src $CONTAINER_BUILD_PATH/src
COPY ./mypy_lockfile.txt ./mypy.ini ./pants ./pants.toml ./pytest_lockfile ./pytest.ini $CONTAINER_BUILD_PATH

RUN cd $CONTAINER_BUILD_PATH && curl -L -O <https://static.pantsbuild.org/setup/pants> && chmod +x $CONTAINER_BUILD_PATH/pants
RUN $CONTAINER_BUILD_PATH/pants --version
RUN $CONTAINER_BUILD_PATH/pants package ::
RUN cp -r $CONTAINER_BUILD_PATH/dist /dist/