-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fir working_dir and 📖 add docker example
- Loading branch information
1 parent
dc5a726
commit 95ee70d
Showing
29 changed files
with
575 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
from typing import Dict, List, Optional | ||
|
||
|
||
def resolve_env_vars_list(env_vars: Optional[List[str]]) -> Dict[str, str]: | ||
res = {} | ||
|
||
if env_vars is not None: | ||
for env_var in env_vars: | ||
if "=" in env_var: | ||
var, value = env_var.split("=", 1) | ||
res[var] = value | ||
else: | ||
if value := os.getenv(env_var): | ||
res[env_var] = value | ||
|
||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Dagster libraries to run both dagster-webserver and the dagster-daemon. Does not | ||
# need to have access to any pipeline code. | ||
|
||
FROM python:3.10-slim | ||
|
||
ENV UV_SYSTEM_PYTHON=1 | ||
|
||
# install uv | ||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv pip install \ | ||
dagster \ | ||
dagster-graphql \ | ||
dagster-webserver \ | ||
dagster-postgres \ | ||
dagster-docker \ | ||
dagster-k8s \ | ||
ray[all] | ||
|
||
WORKDIR /src | ||
|
||
COPY pyproject.toml README.md ./ | ||
COPY dagster_ray ./dagster_ray | ||
|
||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv pip install -e . | ||
|
||
# Set $DAGSTER_HOME and copy dagster instance and workspace YAML there | ||
ENV DAGSTER_HOME=/dagster_home | ||
|
||
WORKDIR $DAGSTER_HOME | ||
|
||
COPY examples/docker/run_launcher/ ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Example Dagster + Ray deployment with Docker | ||
|
||
1. Start all services with Docker Compose: | ||
|
||
```shell | ||
docker compose up --build | ||
``` | ||
|
||
2. In your browser, open `localhost:3000` to access the Dagster UI and `localhost:8265` to access the Ray dashboard. | ||
|
||
3. Launch a job. Observe how the steps are executed in separate Ray jobs in parallel. | ||
|
||
4. Make changes to `src/definitions.py`. |
Oops, something went wrong.