Running a Worker problem

Hello,

When initializing a worker, I have a problem with the launch

  • Ubuntu 18.04 update
  • Nvidia drivers / docker is ok
  • GPU 1080TI NVD

my env.json file

{ 
  "ETH_ADDRESS":"0x46f285a91658eCC8b9d2da5232A6776700fB0A46",
  "MODEL_NAME": "gpt-2-large-torch-serving",
  "GPU_DEVICE_NUMBER": "0",
  "AIN_PRIVATE_KEY": ""
} 

Command:

 sudo docker run -d --name ain-worker \
 -v /home/grousset:/server/env.json \
 -v /var/run/docker.sock:/var/run/docker.sock \
 --network host ainblockchain/worker-docker

Logs :

secp256k1 unavailable, reverting to browser version
2021-03-10T12:51:37.310Z [common/constants] error: [-] Failed to load env file.
/server/dist/common/constants.js:38
exports.MODEL_NAME = env.MODEL_NAME, exports.GPU_DEVICE_NUMBER = env.GPU_DEVICE_NUMBER, exports.ETH_ADDRESS = env.ETH_ADDRESS, exports.AIN_PRIVATE_KEY = env.AIN_PRIVATE_KEY;
                         ^

TypeError: Cannot read property 'MODEL_NAME' of undefined
    at Object.<anonymous> (/server/dist/common/constants.js:38:26)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/server/dist/handler/worker.js:38:32)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)

Thanks for your help

You must specify filename for the path to your ‘env.json’ file.

Please try this:

 sudo docker run -d --name ain-worker \
 -v /home/grousset/env.json:/server/env.json \
 -v /var/run/docker.sock:/var/run/docker.sock \
 --network host ainblockchain/worker-docker
1 Like

Also, you should remove the AIN_PRIVATE_KEY as it’s added automatically by the process on the node’s first start.