in ecs-init/docker/docker.go [339:359]
func (c *client) LoadEnvVars() map[string]string {
envVariables := make(map[string]string)
// merge in instance-specific environment variables
for envKey, envValue := range c.loadCustomInstanceEnvVars() {
if envKey == config.GPUSupportEnvVar && envValue == "true" {
if !nvidiaGPUDevicesPresent() {
continue
}
}
envVariables[envKey] = envValue
}
// merge in user-supplied environment variables
for envKey, envValue := range c.loadUsrEnvVars() {
if val, ok := envVariables[envKey]; ok {
log.Debugf("Overriding instance config %s of value %s to %s", envKey, val, envValue)
}
envVariables[envKey] = envValue
}
return envVariables
}