https://dagster.io/ logo
#ask-community
Title
# ask-community
c

Cyril Humbert

07/20/2023, 10:03 AM
Hello, with Dagster OSS, in a workspace.yml file, is there a way to customize the PATH for a given code location? For example, in:
Copy code
# workspace.yml
load_from:
  - python_module:
      module_name: assets_proj1
      working_directory: assets_proj1
  - python_module:
      module_name: assets_proj2
      working_directory: assets_proj2
      executable_path: assets_proj2/venv/bin/python
I would like to configure assets_proj2 PATH as assets_proj2/venv/bin:$PATH so that the commands from this venv are found by default in Dagster jobs/assets. (This is related to https://github.com/dagster-io/dagster/issues/9583).
1
c

claire

07/20/2023, 11:04 PM
Hi Cyril. Not 100% sure this works for you, but you can specify a path of a code location: https://docs.dagster.io/concepts/code-locations/workspace-files#from-a-file
c

Cyril Humbert

07/21/2023, 7:41 AM
Hi Claire. Actually the code location is properly found but the dbt command is not found (because it is installed in a separate venv). Thus I wonder if I can adjust the environment variables on a code location basis from the workspace.yml file.
c

claire

07/21/2023, 4:17 PM
I don't believe there is currently a way to add custom env vars per code location via the workspace YAML file
v

Vivek Ayer

08/01/2023, 5:21 PM
@claire related to this, I’m trying to specify an EFS volume id like so
Copy code
volumes:
          - name: dbtProfiles
            efsVolumeConfiguration:
              fileSystemId: 
                env:
                  EFS_VOLUME_ID
              rootDirectory: /
Sounds like we can’t reference environment variables at all in
dagster_cloud.yaml
?
Basically my deployments need to reference two different EFS volumes since the cloud deployments are in separate VPCs. Any help appreciated!