From 07bcc5a756f85483ece3654e51ac51e2e7ef7cda Mon Sep 17 00:00:00 2001 From: Janine Olear Date: Fri, 22 Nov 2024 18:41:27 +0100 Subject: [PATCH 1/3] provide cli containerfile Signed-off-by: Janine Olear --- Containerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 00000000..328d9536 --- /dev/null +++ b/Containerfile @@ -0,0 +1,23 @@ +FROM python:3.12-slim + +COPY pyproject.toml ./ +COPY src ./src + +RUN pip install typing-extensions sigstore-protobuf-specs protobuf in-toto-attestation cryptography certifi pyOpenSSL sigstore + +RUN echo '#!/bin/bash\n\ +cd "/src" && python sign.py' > /usr/local/bin/sign + +RUN echo '#!/bin/bash\n\ +cd "/src" && python verify.py' > /usr/local/bin/verify + +RUN echo '#!/bin/bash\n\ +echo "Usage:"\n\ +echo " verify - Runs the verify.py Python script"\n\ +echo " sign - Runs the sign.py Python script"\n\ +echo " help - Displays this help message"' > /usr/local/bin/help + +RUN chmod +x /usr/local/bin/sign /usr/local/bin/verify /usr/local/bin/help + +CMD ["help"] + From 2af4806e0846a31383533a72314c986d278b83b1 Mon Sep 17 00:00:00 2001 From: Janine Olear Date: Sat, 23 Nov 2024 21:27:41 +0100 Subject: [PATCH 2/3] update py version and change dep install Signed-off-by: Janine Olear --- Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfile b/Containerfile index 328d9536..ed3d8532 100644 --- a/Containerfile +++ b/Containerfile @@ -1,9 +1,9 @@ -FROM python:3.12-slim +FROM python:3.13-slim COPY pyproject.toml ./ COPY src ./src -RUN pip install typing-extensions sigstore-protobuf-specs protobuf in-toto-attestation cryptography certifi pyOpenSSL sigstore +RUN python -m pip install model_signing RUN echo '#!/bin/bash\n\ cd "/src" && python sign.py' > /usr/local/bin/sign From bbd1cbb9e426ea6e39745daa1c05e438d23311bd Mon Sep 17 00:00:00 2001 From: Janine Olear Date: Mon, 2 Dec 2024 18:58:19 +0100 Subject: [PATCH 3/3] add license header to Containerfile Signed-off-by: Janine Olear --- Containerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Containerfile b/Containerfile index ed3d8532..34808ccb 100644 --- a/Containerfile +++ b/Containerfile @@ -1,3 +1,21 @@ +# Copyright 2024 The Sigstore Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""For the stable high-level API, see model_signing.api.""" + +__version__ = "0.1.1" + FROM python:3.13-slim COPY pyproject.toml ./