Question
· Dec 6, 2020

aoc2020-objectscript-template Error: Invalid Community Edition license, may have exceeded core limit.

Good evening Intersystems Community,

I want to participate in the Advent of Code 2020 and followed the installation instructions in "The Advent of Code 2020 contest ObjectScript template" (https://openexchange.intersystems.com/package/aoc2020-objectscript-template).

Unforunately I get "Error: Invalid Community Edition license, may have exceeded core limit." at the step "docker-compose build".

I think I already found a way to tell docker to use less cores (docker run --cpus 2), but I can't figure out how to integrate that into "docker-compose build".

I would really appreciate any advice, thanks!

Best regards,
Stefan Katzensteiner

Product version: IRIS 2020.4
Discussion (12)1
Log in or sign up to continue

Thanks for replies. I tried the following:

docker-compose.yml
version: '3.6'
services:
  iris:
    build: 
      context: .
      dockerfile: Dockerfile
    restart: always
    ports: 
      - 1972
      - 52773
      - 53773
    volumes:
      - ./:/irisdev/app
    deploy:
      resources:
        limits:
          cpus: '0.50'

Command line
docker-compose --compatibility build

In my understanding --compatibility should translate the cpus: '0.50' into the equivalent version 2 parameter.
But I could not get it to work. :-(

This Docker-Compose File ist working on Windows without Compability mode:

version: '3.6'
services:
  iris:
    build: 
      context: .
      dockerfile: Dockerfile
    restart: always
    ports: 
      - 1972
      - 52773
      - 53773
    # If your CPU has >8 cores limit InterSystems IRIS CE to 8 with
    cpuset: "0-1"
    volumes:
      - ./:/irisdev/app

With this Limitation:
USER>D $System.CPU.Dump()

-- CPU Info for node d4769ce95a0e --------------------------------------------
          Architecture: x86
                 Model: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
                Vendor: Intel
          # of threads: 2
            # of cores: 2
            # of chips: 1
 # of threads per core: 1
   # of cores per chip: 4
          MT supported: 0
            MT enabled: 0
                   MHz: 3200
------------------------------------------------------------------------------

Without:

-- CPU Info for node da469c6005ed --------------------------------------------
          Architecture: x86
                 Model: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
                Vendor: Intel
          # of threads: 4
            # of cores: 4
            # of chips: 1
 # of threads per core: 1
   # of cores per chip: 4
          MT supported: 0
            MT enabled: 0
                   MHz: 3200
------------------------------------------------------------------------------

One difference I see between your set up and mine is that I have aa AMD Ryzen 5 2600 Six-Core Processor  3.40 GHz and you have an Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz. I think its unlikely that Intel vs. AMD is the cause but who knows.

Could you go into more detail about the steps you took to use your Docker-Compose File? Did you use it with "docker-compose build" or "docker-compose up"?

I think that "docker-compose build" is ignoring the "cpuset: "0-1" while creating the docker iris image at my computer. Because you do not exeed 8 cores this would not be a problem for you and when you start the container it somehow starts to use this setting (as shown by your section "With this Limitation:").

I gave up to modify docker-compose.yml.

I commented out the last line of the Dockerfile:
# RUN iris start IRIS  && iris session IRIS < /tmp/iris.script && iris stop IRIS quietly

Now I did a "docker-compose build" but because I did not start iris I did not get my "exceeded core limit" error.

But I got a "Successfully tagged objectscript-docker-template_iris:latest"

With this I could "docker run --name iris --cpuset-cpus=0-7 -d --publish 1972:1972 --publish 52773:52773 objectscript-docker-template_iris:latest"

In the same directory I did "docker exec -it iris bash"

Then you have to do a "iris session IRIS < /tmp/iris.script" and a "iris terminal IRIS"

Finally you can test it with "w ##class(dc.PackageSample.ObjectScript).Test()"

If you use Visual Studio Code you have to change your setting.json as follows:

{
    "objectscript.conn" :{
      "active": true,
      "host": "127.0.0.1",
      "port": 52773,
      "username": "SuperUser",
      "password": "SYS",
      "ns": "USER"
    }
}

Unfortunately, docker-compose does not have any way, on how to limit cpus during build. While it's possible for deploy. The only way to do it in your case, is to build image manually with specified limitation.

docker build -t someimagename --cpuset-cpus 0 .

and then just add this image name to docker-compose.yml, you can keep the build section, it will not be used if you desired image already produced.

services:
  iris:
    image: someimagename
    cpuset: "0-7"