|
1 |
| -The instructions below are for building your own Docker image. A prebuilt Docker image is available on Docker Cloud, if you only want to run the embedPy image then install Docker and [read the main instructions](https://github.com/KxSystems/embedPy#docker) on how to do this. |
| 1 | +# Run |
2 | 2 |
|
3 |
| -# Preflight |
| 3 | +If you have [Docker installed](https://www.docker.com/community-edition) there is a prebuilt docker image you can run with: |
| 4 | + |
| 5 | + $ docker run -it --name myembedpy kxsys/embedpy |
| 6 | + kdb+ on demand - Personal Edition |
| 7 | + |
| 8 | + [snipped] |
| 9 | + |
| 10 | + I agree to the terms of the license agreement for kdb+ on demand Personal Edition (N/y): y |
| 11 | + |
| 12 | + If applicable please provide your company name (press enter for none): ACME Limited |
| 13 | + Please provide your name: Bob Smith |
| 14 | + Please provide your email (requires validation): [email protected] |
| 15 | + KDB+ 3.5 2018.04.25 Copyright (C) 1993-2018 Kx Systems |
| 16 | + l64/ 4()core 7905MB kx 0123456789ab 172.17.0.2 EXPIRE 2018.12.04 [email protected] KOD #0000000 |
| 17 | + |
| 18 | + q) |
| 19 | + |
| 20 | +For subsequent runs, you will not be prompted to redo the license setup when calling: |
| 21 | + |
| 22 | + $ docker start -ai myembedpy |
| 23 | + KDB+ 3.5 2018.04.25 Copyright (C) 1993-2018 Kx Systems |
| 24 | + l64/ 4()core 7905MB kx 0123456789ab 172.17.0.2 EXPIRE 2018.12.04 [email protected] KOD #0000000 |
| 25 | + |
| 26 | + q) |
| 27 | + |
| 28 | +If you prefer to drop straight into `bash` you can with: |
| 29 | + |
| 30 | + $ docker run -it kxsys/embedpy bash |
| 31 | + [snipped license setup] |
| 32 | + kx@8ac226623908:~$ conda info |
| 33 | + |
| 34 | + active environment : kx |
| 35 | + active env location : /home/kx/.conda/envs/kx |
| 36 | + [snipped] |
| 37 | + kx@8ac226623908:~$ q |
| 38 | + KDB+ 3.5 2018.04.25 Copyright (C) 1993-2018 Kx Systems |
| 39 | + l64/ 4()core 7905MB kx 0123456789ab 172.17.0.2 EXPIRE 2018.12.04 [email protected] KOD #0000000 |
| 40 | + |
| 41 | + q) |
| 42 | + |
| 43 | +**N.B.** [build instructions for the image are available](README.md#build) |
| 44 | + |
| 45 | +## Headless/Presets |
| 46 | + |
| 47 | +If you are running this in a headless configuration, or wish to provide out-of-bound the answers to the license process, then you can call upon the following environment variables. This is handled either by [`--env` (or `--env-file`) as detailed on the docker website](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file). |
| 48 | + |
| 49 | + * **`KDB_LICENSE_AGREE`:** pass in `yes` (case-insensitive) to agree to the license agreement |
| 50 | + * **`COMPANY` (optional):** provide company name |
| 51 | + * **`NAME`:** provide your name |
| 52 | + * **`EMAIL`:** provide your email address |
| 53 | + |
| 54 | +If any of these are missing, then you will be prompted for the value as before. |
| 55 | + |
| 56 | +**N.B.** alternatively if you already have a licence you can use `QLIC_KC` (also supported is `QLIC_K4`) which is the base64 encoded contents of your `kc.lic` file |
| 57 | + |
| 58 | +This allows for the following usage: |
| 59 | + |
| 60 | + |
| 61 | + $ echo \\\\ | docker run -i -e QLIC_KC=$(cat $QHOME/kc.lic | base64 -w0) --name myembedpywithlic kxsys/embedpy q -q |
| 62 | + $ echo 'p)print(1+2)' | docker start -i myembedpywithlic |
| 63 | + 3 |
| 64 | + |
| 65 | + |
| 66 | +# Build |
| 67 | + |
| 68 | +The instructions below are for building your own Docker image. A prebuilt Docker image is available on Docker Cloud, if you only want to run the embedPy image then install Docker and [read the instructions above](README.md#run) on how to do this. |
| 69 | + |
| 70 | +## Preflight |
4 | 71 |
|
5 | 72 | You will need [Docker installed](https://www.docker.com/community-edition) on your workstation; make sure it is a recent version.
|
6 | 73 |
|
7 | 74 | Check out a copy of the project with:
|
8 | 75 |
|
9 | 76 | git clone https://github.com/KxSystems/embedPy.git
|
10 | 77 |
|
11 |
| -# Build |
| 78 | +## Building |
12 | 79 |
|
13 | 80 | To build locally the project you run:
|
14 | 81 |
|
|
0 commit comments