Skip to content

Fixing MAX_JOBS in Dockerfile, resolving issue #91#256

Open
SydalsITC wants to merge 1 commit intomistralai:mainfrom
SydalsITC:sydalsitc-maxjobs
Open

Fixing MAX_JOBS in Dockerfile, resolving issue #91#256
SydalsITC wants to merge 1 commit intomistralai:mainfrom
SydalsITC:sydalsitc-maxjobs

Conversation

@SydalsITC
Copy link
Copy Markdown

Hej,

after running into OOM, I fixed the MAX_JOBS issue #91. The only file that needed to be modified is the Dockerfile.

Explanation
Build arguments (ARG) are only visible at Dockerfile level, they're not passed through into the container. Therefor MAX_JOBS needs to be passed to the container as environment variable which only can be done bei ENV. That, on the other hand, cannot be overriden by a command line option like "--build-arg" (there's no "--build-env").

To be configurable, it needs to be defined as ARG first and then set with ENV while refering to the ARG:

ARG MAX_JOBS
ENV MAX_JOBS=$MAX_JOBS

RUN pip3 install ...

Med hilsen fra Danmark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants