From b5b60660988870c6f2aec89e8ac884b7f521f032 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 13 Aug 2025 15:42:27 +0100 Subject: [PATCH 1/4] Added licence handling to the Dockerfile --- .github/workflows/deploy.yml | 1 + Dockerfile | 3 +++ README.md | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d49e531..a31018d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,6 +12,7 @@ jobs: uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main with: template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-wolfram' + include-licence-file: true secrets: aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }} aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}} diff --git a/Dockerfile b/Dockerfile index c00842e..a4aedad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,8 @@ ENV FUNCTION_INTERFACE="file" ENV LOG_LEVEL="DEBUG" +# Copy Wolfram licence if present - stored as LICENCE.txt for working with the lambda_build Github Actions workflow +RUN if [ -f dist/LICENSE.txt ]; then cp dist/LICENSE.txt /home/wolframengine/.WolframEngine/Licensing/mathpass; else echo "No license file found."; fi + # Copy the evaluation function to the app directory COPY ./evaluation_function.wl /app/evaluation_function.wl \ No newline at end of file diff --git a/README.md b/README.md index 71b1128..c280b2f 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,15 @@ In[1] := $PasswordFile // FilePrint 1e1d781ed0a3 6520-03713-97466 4304-2718-2K5ATR 5095-179-696:2,0,8,8:80001:20190627 ``` -This gives you a password that you can copy to a `mathpass` file on your host machine. Recommended to store in the `local directory/Licensing` +This gives you a password that you can copy to a `mathpass` file on your host machine. Store in the `local directory/dist/LICENSE.TXT` +It will be bundled locally in the build. **4. Run the Evaluation Function container** Run the following command to start the Wolfram Engine container with the license: ```bash -docker run -it --rm -v $(pwd)/Licensing:/home/wolframengine/.WolframEngine/Licensing/ {evaluation_function_tag} +docker run -it --rm {evaluation_function_tag} ``` This command assumes that you have a `mathpass` file in the Licensing directory, and the container is started with the `wolframengine` user. From 0f6b96fde70fcc834c34feed5844232ca0066d31 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 13 Aug 2025 15:47:03 +0100 Subject: [PATCH 2/4] Switched deploy workflow to use in development base workflow. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a31018d..c9d98d2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ on: jobs: deploy: - uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main + uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@feature/licence with: template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-wolfram' include-licence-file: true From d993a26ee073a88eb9c3b6b52bc5ad36426807c2 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 13 Aug 2025 15:49:45 +0100 Subject: [PATCH 3/4] Removed redundent flag --- .github/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c9d98d2..f6e36b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,6 @@ jobs: uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@feature/licence with: template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-wolfram' - include-licence-file: true secrets: aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }} aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}} From aa63e22160adb8c4291e60c1d07bbe289372fcdc Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 13 Aug 2025 15:54:08 +0100 Subject: [PATCH 4/4] Switched back to main --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f6e36b9..d49e531 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ on: jobs: deploy: - uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@feature/licence + uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main with: template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-wolfram' secrets: