Skip to content

How can I install drivers like ODBC when deploying my code to Dagster+ Serverless? #28246

Discussion options

You must be logged in to vote

You can install that required driver either as part of your CI/CD process by using a lifecycle hook pre-install script, or by creating and using your own custom base image.

To use a lifecycle hook pre-install script requires disabling PEX deploys. If using the GitHub Actions workflow, comment out this line to disable PEX-based deploys:

env:
  DAGSTER­_CLOUD­_URL: ...
  DAGSTER­_CLOUD­_API­_TOKEN: ...
  # ENABLE­_FAST­_DEPLOYS: 'true'

Then in the root of your repo you can add a shell script named dagster_cloud_pre_install.sh that contains the instructions to install the required driver. Example:

#!/bin/bash
set -e

echo "Starting dagster_cloud_pre_install.sh..."

# Update package lists
apt…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by garethbrickman
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: troubleshooting Related to debugging and error messages Dagster+ Relates to Dagster paid plans area: python-dependencies Related to Python dependencies
2 participants