NVIDIA / pyxis

Container plugin for Slurm Workload Manager
Apache License 2.0
273 stars 31 forks source link

Can't pass environment variables to entrypoint #145

Closed skandermoalla closed 1 month ago

skandermoalla commented 1 month ago

Hello,

I have an entrypoint that reads environment variables at runtime like docker run --env FOO=1 CMD but it seems like Pyxis only sets environment variables set with export FOO=1; srun ... --container-env=FOO CMD after the entrypoint has run, so they're not yet available when the entrypoint is running.

Is this by design? How can one make the entrypoint read environment variables set at runtime?

Thanks

> enroot version
3.5.0
flx42 commented 1 month ago

Looks like it's a bug, I will try to fix it when possible.

flx42 commented 1 month ago

This should be fixed in the next release, note that only variables specified with --container-env will be passed to the entrypoint.