Skip to content

Commit

Permalink
feat: move pip installs to requirements files
Browse files Browse the repository at this point in the history
feat: move pip installs to requirements files
  • Loading branch information
AbeCoull authored Oct 23, 2023
2 parents 03fb054 + 2ed189c commit 6e08b88
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 74 deletions.
3 changes: 3 additions & 0 deletions base/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ context:
braket_container:
source: ../../src/braket_container.py
target: braket_container.py
requirements:
source: ../../base/jobs/docker/1.0/py3/requirements.txt
target: requirements.txt

images:
BuildBaseCPUJobsPy3DockerImage:
Expand Down
22 changes: 4 additions & 18 deletions base/jobs/docker/1.0/py3/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,12 @@ WORKDIR /

RUN apt-get update && apt-get -y install cmake protobuf-compiler


# Copy the dependencies file
COPY requirements.txt /
# Installing our custom python libraries
RUN ${PIP} install --no-cache --upgrade \
amazon-braket-default-simulator==1.20.1 \
amazon-braket-schemas==1.19.1 \
amazon-braket-pennylane-plugin==1.21.0 \
amazon-braket-sdk==1.58.0 \
awscli==1.29.53 \
botocore==1.31.53 \
boto3==1.28.53 \
dask==2023.1.1 \
matplotlib==3.6.3 \
numpy==1.23.5 \
pandas==2.0.0 \
pennylane==0.32.0 \
PennyLane-Lightning==0.32.0 \
scikit-learn==1.2.2 \
requests==2.26.0 \
scipy==1.9.3 \
qiskit-braket-provider==0.0.4
-r requirements.txt


RUN ${PIP} install --no-cache --upgrade sagemaker-training==4.4.10

Expand Down
17 changes: 17 additions & 0 deletions base/jobs/docker/1.0/py3/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
amazon-braket-default-simulator==1.20.1
amazon-braket-schemas==1.19.1
amazon-braket-pennylane-plugin==1.21.0
amazon-braket-sdk==1.58.0
awscli==1.29.53
botocore==1.31.53
boto3==1.28.53
dask==2023.1.1
matplotlib==3.6.3
numpy==1.23.5
pandas==2.0.0
pennylane==0.32.0
PennyLane-Lightning==0.32.0
qiskit-braket-provider==0.0.4
requests==2.26.0
scikit-learn==1.2.2
scipy==1.9.3
3 changes: 3 additions & 0 deletions pytorch/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ context:
braket_container:
source: ../../src/braket_container.py
target: braket_container.py
requirements:
source: ../../pytorch/jobs/docker/2.0/py3/requirements.txt
target: requirements.txt

images:
BuildPytorchGPUJobsPy3DockerImage:
Expand Down
31 changes: 5 additions & 26 deletions pytorch/jobs/docker/2.0/py3/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,13 @@ RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \

RUN apt-get update && apt-get -y install cmake protobuf-compiler


# Copy the dependencies file
COPY requirements.txt /
# Installing our custom python libraries
RUN ${PIP} install --no-cache --upgrade \
amazon-braket-default-simulator==1.20.1 \
amazon-braket-schemas==1.19.1 \
amazon-braket-pennylane-plugin==1.21.0 \
amazon-braket-sdk==1.58.0 \
awscli==1.29.53 \
botocore==1.31.53 \
boto3==1.28.53 \
dask==2023.1.1 \
decorator==4.4.0 \
h5py==3.8.0 \
ipykernel==5.3.4 \
jinja2==2.11.3 \
keras==2.12.0 \
markupsafe==2.1.2 \
matplotlib==3.6.3 \
numpy==1.23.5 \
openfermion==1.5.1 \
pandas==2.0.0 \
PennyLane==0.32.0 \
PennyLane-Lightning[gpu]==0.32.0 \
pydantic==1.10.6 \
requests==2.26.0 \
scikit-learn==1.2.2 \
six==1.16.0 \
scipy==1.9.3 \
typing_extensions==4.3.0

-r requirements.txt

# Ensure below libraries are updated to mitigate vulnerability
RUN ${PIP} install --no-cache --upgrade \
Expand Down
29 changes: 29 additions & 0 deletions pytorch/jobs/docker/2.0/py3/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
amazon-braket-default-simulator==1.20.1
amazon-braket-schemas==1.19.1
amazon-braket-pennylane-plugin==1.21.0
amazon-braket-sdk==1.58.0
awscli==1.29.53
botocore==1.31.53
boto3==1.28.53
dask==2023.1.1
decorator==4.4.0
h5py==3.8.0
ipykernel==5.3.4
jinja2==2.11.3
keras==2.12.0
markupsafe==2.1.2
matplotlib==3.6.3
numpy==1.23.5
openfermion==1.5.1
pandas==2.0.0
PennyLane==0.32.0
PennyLane-Lightning[gpu]==0.32.0
pydantic==1.10.6
requests==2.26.0
scikit-learn==1.2.2
six==1.16.0
scipy==1.9.3
typing_extensions==4.3.0

# https://nvd.nist.gov/vuln/detail/CVE-2023-37920
certifi>=2023.7.22
3 changes: 3 additions & 0 deletions tensorflow/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ context:
braket_container:
source: ../../src/braket_container.py
target: braket_container.py
requirements:
source: ../../tensorflow/jobs/docker/2.12/py3/requirements.txt
target: requirements.txt

images:
BuildTensorflowGPUJobsPy3DockerImage:
Expand Down
33 changes: 3 additions & 30 deletions tensorflow/jobs/docker/2.13/py3/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,11 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# Ensure below libraries are pinned to mitigate vulnerability
RUN ${PIP} install --no-cache --upgrade \
# https://nvd.nist.gov/vuln/detail/CVE-2023-37920
certifi>=2023.7.22

# Copy the dependencies file
COPY requirements.txt /
# Installing our custom python libraries
RUN ${PIP} install --no-cache --upgrade \
amazon-braket-default-simulator==1.20.1 \
amazon-braket-schemas==1.19.1 \
amazon-braket-pennylane-plugin==1.21.0 \
amazon-braket-sdk==1.58.0 \
awscli==1.29.53 \
botocore==1.31.53 \
boto3==1.28.53 \
dask==2023.1.1 \
h5py==3.8.0 \
ipykernel==5.3.4 \
jinja2==3.1.2 \
keras==2.12.0 \
markupsafe==2.1.2 \
matplotlib==3.6.3 \
numpy==1.23.5 \
openfermion==1.5.1 \
pandas==2.0.0 \
PennyLane==0.32.0 \
PennyLane-Lightning==0.32.0 \
pydantic==1.10.6 \
requests==2.26.0 \
scikit-learn==1.2.2 \
six==1.16.0 \
scipy==1.9.3 \
typing_extensions==4.3.0
-r requirements.txt

RUN ${PIP} install --no-cache --upgrade sagemaker-training==4.4.10

Expand Down
25 changes: 25 additions & 0 deletions tensorflow/jobs/docker/2.13/py3/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
amazon-braket-default-simulator==1.20.1
amazon-braket-schemas==1.19.1
amazon-braket-pennylane-plugin==1.21.0
amazon-braket-sdk==1.58.0
awscli==1.29.53
botocore==1.31.53
boto3==1.28.53
dask==2023.1.1
h5py==3.8.0
ipykernel==5.3.4
jinja2==3.1.2
keras==2.12.0
markupsafe==2.1.2
matplotlib==3.6.3
numpy==1.23.5
openfermion==1.5.1
pandas==2.0.0
PennyLane==0.32.0
PennyLane-Lightning==0.32.0
pydantic==1.10.6
requests==2.26.0
scikit-learn==1.2.2
six==1.16.0
scipy==1.9.3
typing_extensions==4.3.0

0 comments on commit 6e08b88

Please sign in to comment.