From d469eee6b19ad36e08440b0637b852b1f5a130f4 Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:34:06 -0500 Subject: [PATCH 1/9] Create lock file --- Dockerfile-notebook | 2 +- Dockerfile-ray-node | 4 +- client/requirements-lock.txt | 119 +++++++++++++++++++++++++++++++ gateway/Dockerfile | 4 +- gateway/requirements-lock.txt | 92 ++++++++++++++++++++++++ renovate.json | 5 ++ repository/Dockerfile | 2 +- repository/requirements-lock.txt | 20 ++++++ 8 files changed, 242 insertions(+), 6 deletions(-) create mode 100644 client/requirements-lock.txt create mode 100644 gateway/requirements-lock.txt create mode 100644 repository/requirements-lock.txt diff --git a/Dockerfile-notebook b/Dockerfile-notebook index 585bd0f84..6b1d8d9d4 100644 --- a/Dockerfile-notebook +++ b/Dockerfile-notebook @@ -15,7 +15,7 @@ USER $NB_UID COPY --chown=$NB_UID:$NB_UID ./client ./qs WORKDIR /qs -RUN pip install . --no-cache-dir &&\ +RUN pip install -r requirements-lock.txt --no-cache-dir &&\ pip install --no-cache-dir -r requirements-notebook.txt WORKDIR / diff --git a/Dockerfile-ray-node b/Dockerfile-ray-node index d563b9d77..b227f6850 100644 --- a/Dockerfile-ray-node +++ b/Dockerfile-ray-node @@ -11,7 +11,7 @@ COPY --chown=$RAY_UID:$RAY_UID ./client ./qs WORKDIR /qs # TODO: certifi version pinned to 2023.7.22. More info in #870 # TODO: pyarrow version pinned to 14.0.1 -RUN pip install . --no-cache-dir &&\ +RUN pip install -r requirements-lock.txt --no-cache-dir &&\ pip install --no-cache-dir pyarrow==14.0.1 &&\ pip install --no-cache-dir certifi==2023.7.22 @@ -33,7 +33,7 @@ COPY --chown=$RAY_UID:$RAY_UID ./client ./qs WORKDIR /qs # TODO: certifi version pinned to 2023.7.22. More info in #870 # TODO: pyarrow version pinned to 14.0.1 -RUN pip install . --no-cache-dir &&\ +RUN pip install -r requirements-lock.txt --no-cache-dir &&\ pip install --no-cache-dir pyarrow==14.0.1 &&\ if [ "$TARGETARCH" = "arm64" ] ; \ then pip install --no-cache-dir certifi==2023.7.22 ; \ diff --git a/client/requirements-lock.txt b/client/requirements-lock.txt new file mode 100644 index 000000000..5c30354aa --- /dev/null +++ b/client/requirements-lock.txt @@ -0,0 +1,119 @@ +aiobotocore==2.9.0 +aiohttp==3.9.1 +aiohttp-cors==0.7.0 +aioitertools==0.11.0 +aiosignal==1.3.1 +asttokens==2.4.1 +async-timeout==4.0.3 +attrs==23.2.0 +backoff==2.2.1 +blessed==1.20.0 +botocore==1.33.13 +cachetools==5.3.2 +certifi==2023.11.17 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +cloudpickle==2.2.1 +colorful==0.5.5 +comm==0.2.1 +cryptography==41.0.7 +decorator==5.1.1 +Deprecated==1.2.14 +dill==0.3.7 +distlib==0.3.8 +exceptiongroup==1.2.0 +executing==2.0.1 +filelock==3.13.1 +frozenlist==1.4.1 +fsspec==2023.12.2 +google-api-core==2.15.0 +google-auth==2.26.1 +googleapis-common-protos==1.62.0 +gpustat==1.1.1 +grpcio==1.60.0 +ibm-cloud-sdk-core==3.18.0 +ibm-platform-services==0.48.0 +idna==3.6 +importlib-metadata==6.11.0 +ipython==8.18.1 +ipywidgets==8.1.1 +jedi==0.19.1 +jmespath==1.0.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.12.1 +jupyterlab-widgets==3.0.9 +matplotlib-inline==0.1.6 +mpmath==1.3.0 +msgpack==1.0.7 +multidict==6.0.4 +numpy==1.26.3 +nvidia-ml-py==12.535.133 +opencensus==0.11.4 +opencensus-context==0.1.3 +opentelemetry-api==1.22.0 +opentelemetry-exporter-otlp-proto-common==1.22.0 +opentelemetry-exporter-otlp-proto-grpc==1.22.0 +opentelemetry-instrumentation==0.43b0 +opentelemetry-instrumentation-requests==0.43b0 +opentelemetry-proto==1.22.0 +opentelemetry-sdk==1.22.0 +opentelemetry-semantic-conventions==0.43b0 +opentelemetry-util-http==0.43b0 +packaging==23.2 +pandas==2.1.4 +parso==0.8.3 +pbr==6.0.0 +pexpect==4.9.0 +platformdirs==3.11.0 +ply==3.11 +prometheus-client==0.19.0 +prompt-toolkit==3.0.43 +protobuf==4.25.1 +psutil==5.9.7 +ptyprocess==0.7.0 +pure-eval==0.2.2 +py-spy==0.3.14 +pyarrow==14.0.2 +pyasn1==0.5.1 +pyasn1-modules==0.3.0 +pycparser==2.21 +pydantic==1.10.13 +Pygments==2.17.2 +PyJWT==2.8.0 +pyspnego==0.10.2 +python-dateutil==2.8.2 +pytz==2023.3.post1 +PyYAML==6.0.1 +qiskit==0.45.1 +qiskit-ibm-provider==0.7.3 +qiskit-ibm-runtime==0.17.0 +qiskit-terra==0.45.1 +ray==2.9.0 +referencing==0.32.0 +requests==2.31.0 +requests-ntlm==1.2.0 +rpds-py==0.16.2 +rsa==4.9 +rustworkx==0.13.2 +s3fs==2023.12.2 +scipy==1.11.4 +six==1.16.0 +smart-open==6.4.0 +stack-data==0.6.3 +stevedore==5.1.0 +symengine==0.11.0 +sympy==1.12 +tqdm==4.66.1 +traitlets==5.14.1 +typing_extensions==4.9.0 +tzdata==2023.4 +urllib3==1.26.18 +virtualenv==20.21.0 +wcwidth==0.2.12 +websocket-client==1.7.0 +websockets==12.0 +widgetsnbextension==4.0.9 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 diff --git a/gateway/Dockerfile b/gateway/Dockerfile index 487d24029..31f06743d 100644 --- a/gateway/Dockerfile +++ b/gateway/Dockerfile @@ -13,8 +13,8 @@ RUN apt-get -y update &&\ rm -rf /var/lib/apt/lists/* USER 0 -COPY gateway/requirements.txt . -RUN pip install -r requirements.txt --no-cache-dir +COPY gateway/requirements-lock.txt . +RUN pip install -r requirements-lock.txt --no-cache-dir COPY gateway . RUN chown -R 1000:100 /usr/src/app &&\ mkdir /usr/src/app/media && chown 1000:100 /usr/src/app/media diff --git a/gateway/requirements-lock.txt b/gateway/requirements-lock.txt new file mode 100644 index 000000000..82cf0f627 --- /dev/null +++ b/gateway/requirements-lock.txt @@ -0,0 +1,92 @@ +aiohttp==3.9.1 +aiohttp-cors==0.7.0 +aiosignal==1.3.1 +annotated-types==0.6.0 +asgiref==3.7.2 +async-timeout==4.0.3 +attrs==23.2.0 +backoff==2.2.1 +blessed==1.20.0 +cachetools==5.3.2 +certifi==2023.11.17 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +colorful==0.5.5 +cryptography==41.0.7 +defusedxml==0.7.1 +Deprecated==1.2.14 +distlib==0.3.8 +dj-rest-auth==5.0.2 +Django==4.2.9 +django-allauth==0.59.0 +django-allow-cidr==0.7.1 +django-concurrency==2.5 +django-filter==23.5 +django-prometheus==2.3.1 +djangorestframework==3.14.0 +djangorestframework-simplejwt==5.3.1 +filelock==3.13.1 +frozenlist==1.4.1 +google-api-core==2.15.0 +google-auth==2.26.1 +googleapis-common-protos==1.62.0 +gpustat==1.1.1 +grpcio==1.60.0 +gunicorn==21.2.0 +idna==3.6 +importlib-metadata==6.11.0 +jsonschema==4.20.0 +jsonschema-specifications==2023.12.1 +kubernetes==28.1.0 +Markdown==3.5.1 +msgpack==1.0.7 +multidict==6.0.4 +nvidia-ml-py==12.535.133 +oauthlib==3.2.2 +opencensus==0.11.4 +opencensus-context==0.1.3 +opentelemetry-api==1.22.0 +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 +opentelemetry-exporter-otlp-proto-common==1.22.0 +opentelemetry-exporter-otlp-proto-grpc==1.22.0 +opentelemetry-exporter-otlp-proto-http==1.22.0 +opentelemetry-instrumentation==0.43b0 +opentelemetry-proto==1.22.0 +opentelemetry-sdk==1.22.0 +opentelemetry-semantic-conventions==0.43b0 +packaging==23.2 +platformdirs==3.11.0 +prometheus-client==0.19.0 +protobuf==4.25.1 +psutil==5.9.7 +psycopg2-binary==2.9.9 +py-spy==0.3.14 +pyasn1==0.5.1 +pyasn1-modules==0.3.0 +pycparser==2.21 +pydantic==2.5.3 +pydantic_core==2.14.6 +PyJWT==2.8.0 +python-dateutil==2.8.2 +python3-openid==3.2.0 +pytz==2023.3.post1 +PyYAML==6.0.1 +ray==2.9.0 +referencing==0.32.0 +requests==2.31.0 +requests-oauthlib==1.3.1 +rpds-py==0.16.2 +rsa==4.9 +six==1.16.0 +smart-open==6.4.0 +sqlparse==0.4.4 +typing_extensions==4.9.0 +urllib3==1.26.18 +virtualenv==20.21.0 +wcwidth==0.2.12 +websocket-client==1.7.0 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 diff --git a/renovate.json b/renovate.json index d6f1d93fa..8611f2be0 100644 --- a/renovate.json +++ b/renovate.json @@ -20,5 +20,10 @@ ], "groupName": "qiskit packages" } + ], + "ignorePaths": [ + "client/requirements-lock.txt", + "gateway/requirements-lock.txt", + "repository/requirements-lock.txt" ] } diff --git a/repository/Dockerfile b/repository/Dockerfile index 20b064ee5..08a28a622 100644 --- a/repository/Dockerfile +++ b/repository/Dockerfile @@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED 1 USER 0 COPY repository . RUN chown -R 1001:0 /usr/src/app &&\ - pip install -r requirements.txt --no-cache-dir + pip install -r requirements-lock.txt --no-cache-dir USER 1001 diff --git a/repository/requirements-lock.txt b/repository/requirements-lock.txt new file mode 100644 index 000000000..50f062b3d --- /dev/null +++ b/repository/requirements-lock.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +Django==4.2.9 +django-allow-cidr==0.7.1 +django-filter==23.5 +django-prometheus==2.3.1 +djangorestframework==3.14.0 +drf-yasg==1.21.7 +gunicorn==21.2.0 +importlib-metadata==7.0.1 +inflection==0.5.1 +Markdown==3.5.1 +packaging==23.2 +prometheus-client==0.19.0 +psycopg2-binary==2.9.9 +pytz==2023.3.post1 +PyYAML==6.0.1 +sqlparse==0.4.4 +typing_extensions==4.9.0 +uritemplate==4.1.1 +zipp==3.17.0 From dbfa42b9bb0586a27875657d69af8e34a4c5c57a Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:02:23 -0500 Subject: [PATCH 2/9] Update Dockerfile-ray-node Co-authored-by: Paul Schweigert --- Dockerfile-ray-node | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile-ray-node b/Dockerfile-ray-node index b227f6850..1ccafc2ad 100644 --- a/Dockerfile-ray-node +++ b/Dockerfile-ray-node @@ -12,6 +12,7 @@ WORKDIR /qs # TODO: certifi version pinned to 2023.7.22. More info in #870 # TODO: pyarrow version pinned to 14.0.1 RUN pip install -r requirements-lock.txt --no-cache-dir &&\ + pip install --no-cache . &&\ pip install --no-cache-dir pyarrow==14.0.1 &&\ pip install --no-cache-dir certifi==2023.7.22 From 4210df224f863cdf887d9f2ce64412d7bab7467c Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:05:02 -0500 Subject: [PATCH 3/9] Fix typo --- Dockerfile-ray-node | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-ray-node b/Dockerfile-ray-node index 1ccafc2ad..2539868d5 100644 --- a/Dockerfile-ray-node +++ b/Dockerfile-ray-node @@ -12,7 +12,7 @@ WORKDIR /qs # TODO: certifi version pinned to 2023.7.22. More info in #870 # TODO: pyarrow version pinned to 14.0.1 RUN pip install -r requirements-lock.txt --no-cache-dir &&\ - pip install --no-cache . &&\ + pip install --no-cache-dir . &&\ pip install --no-cache-dir pyarrow==14.0.1 &&\ pip install --no-cache-dir certifi==2023.7.22 From a414f6b3e70fb7c305a6e3b73f6f37041d7816fb Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:06:33 -0500 Subject: [PATCH 4/9] Update docker ray image --- Dockerfile-ray-node | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile-ray-node b/Dockerfile-ray-node index 2539868d5..45a9bbce8 100644 --- a/Dockerfile-ray-node +++ b/Dockerfile-ray-node @@ -1,6 +1,6 @@ ARG IMAGE_PY_VERSION=py39 -FROM rayproject/ray:2.5.0-$IMAGE_PY_VERSION AS ray-node-amd64 +FROM rayproject/ray:2.9.0-$IMAGE_PY_VERSION AS ray-node-amd64 WORKDIR / USER 0 @@ -19,7 +19,7 @@ RUN pip install -r requirements-lock.txt --no-cache-dir &&\ WORKDIR / RUN rm -r ./qs -FROM rayproject/ray:2.5.0-$IMAGE_PY_VERSION-aarch64 AS ray-node-arm64 +FROM rayproject/ray:2.9.0-$IMAGE_PY_VERSION-aarch64 AS ray-node-arm64 WORKDIR / USER 0 From 1948778d1710bb4e25d1be9b48288a1a2335b5ca Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:13:46 -0500 Subject: [PATCH 5/9] Fix space --- Dockerfile-ray-node | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-ray-node b/Dockerfile-ray-node index 45a9bbce8..968b3202c 100644 --- a/Dockerfile-ray-node +++ b/Dockerfile-ray-node @@ -12,7 +12,7 @@ WORKDIR /qs # TODO: certifi version pinned to 2023.7.22. More info in #870 # TODO: pyarrow version pinned to 14.0.1 RUN pip install -r requirements-lock.txt --no-cache-dir &&\ - pip install --no-cache-dir . &&\ + pip install --no-cache-dir . &&\ pip install --no-cache-dir pyarrow==14.0.1 &&\ pip install --no-cache-dir certifi==2023.7.22 From f1212e8fb753c860880e47cd41d3c55c44ae4a74 Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:19:52 -0500 Subject: [PATCH 6/9] Use pip install . in notebook image --- Dockerfile-notebook | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile-notebook b/Dockerfile-notebook index 6b1d8d9d4..1bca6dcd4 100644 --- a/Dockerfile-notebook +++ b/Dockerfile-notebook @@ -16,6 +16,7 @@ COPY --chown=$NB_UID:$NB_UID ./client ./qs WORKDIR /qs RUN pip install -r requirements-lock.txt --no-cache-dir &&\ + pip install --no-cache-dir . &&\ pip install --no-cache-dir -r requirements-notebook.txt WORKDIR / From 8a062cb3d0e75b8911368563ae1e262e56eed935 Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:22:19 -0500 Subject: [PATCH 7/9] Use setup.py instead of pip file --- Dockerfile-notebook | 3 +-- Dockerfile-ray-node | 3 +-- client/setup.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile-notebook b/Dockerfile-notebook index 1bca6dcd4..2cb508eb2 100644 --- a/Dockerfile-notebook +++ b/Dockerfile-notebook @@ -15,8 +15,7 @@ USER $NB_UID COPY --chown=$NB_UID:$NB_UID ./client ./qs WORKDIR /qs -RUN pip install -r requirements-lock.txt --no-cache-dir &&\ - pip install --no-cache-dir . &&\ +RUN pip install --no-cache-dir . &&\ pip install --no-cache-dir -r requirements-notebook.txt WORKDIR / diff --git a/Dockerfile-ray-node b/Dockerfile-ray-node index 968b3202c..da0bcc865 100644 --- a/Dockerfile-ray-node +++ b/Dockerfile-ray-node @@ -11,8 +11,7 @@ COPY --chown=$RAY_UID:$RAY_UID ./client ./qs WORKDIR /qs # TODO: certifi version pinned to 2023.7.22. More info in #870 # TODO: pyarrow version pinned to 14.0.1 -RUN pip install -r requirements-lock.txt --no-cache-dir &&\ - pip install --no-cache-dir . &&\ +RUN pip install --no-cache-dir . &&\ pip install --no-cache-dir pyarrow==14.0.1 &&\ pip install --no-cache-dir certifi==2023.7.22 diff --git a/client/setup.py b/client/setup.py index 2a16197d4..af231a4fc 100644 --- a/client/setup.py +++ b/client/setup.py @@ -5,7 +5,7 @@ with open("README.md", encoding="utf-8") as f: long_description = f.read() -with open("requirements.txt") as f: +with open("requirements-lock.txt") as f: install_requires = f.read().splitlines() version_path = os.path.abspath( From 582c4b9ad1cb942395edfbe9ec531baadcc49d4b Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:31:58 -0500 Subject: [PATCH 8/9] Let's use 8.13.0 library pinned in requirements --- client/requirements-lock.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/requirements-lock.txt b/client/requirements-lock.txt index 5c30354aa..49fc36cc9 100644 --- a/client/requirements-lock.txt +++ b/client/requirements-lock.txt @@ -36,7 +36,7 @@ ibm-cloud-sdk-core==3.18.0 ibm-platform-services==0.48.0 idna==3.6 importlib-metadata==6.11.0 -ipython==8.18.1 +ipython==8.13.0 ipywidgets==8.1.1 jedi==0.19.1 jmespath==1.0.1 From e038ceb7b38f3b32cee7773da5a2a03ed9fbd16e Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:38:48 -0500 Subject: [PATCH 9/9] Configure lock file in tox --- client/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/tox.ini b/client/tox.ini index 2a7a2e72c..b0df5b80d 100644 --- a/client/tox.ini +++ b/client/tox.ini @@ -17,7 +17,7 @@ setenv = LANGUAGE=en_US LC_ALL=en_US.utf-8 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python -deps = -rrequirements.txt +deps = -rrequirements-lock.txt -rrequirements-dev.txt commands = pip check