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.