Hello, with Dagster OSS, in a workspace.yml file, ...
# ask-community
c
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
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
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
I don't believe there is currently a way to add custom env vars per code location via the workspace YAML file
v
@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!