Jake Kagan

01/11/2023, 7:51 PM
question for anyone who's tried running dagit in a container: let's say i do a brand new project (
dagit project scaffold --name xyz
) usually if i
cd ./xyz
and run
, the server comes up. but if i tried to run dagit from the original folder (without cding into the project file) i'm not able to do it with any of the flags (-w, -d, etc.) can anyone clear up how i can do something like
dagit -w ./xyz
and have the server run
:dagster-bot-resolve: 1
2023-01-11 19:59:46 +0000 - dagster - INFO - Started Dagster code server for module testing in process 230
/usr/local/lib/python3.9/dist-packages/dagster/_core/workspace/ UserWarning: Error loading repository location testing:dagster._core.errors.DagsterInvariantViolationError: No repositories, jobs, pipelines, graphs, asset groups, or asset definitions found in "testing".

Stack Trace:
  File "/usr/local/lib/python3.9/dist-packages/dagster/_grpc/", line 242, in __init__
    self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories(
  File "/usr/local/lib/python3.9/dist-packages/dagster/_grpc/", line 105, in __init__
    loadable_targets = get_loadable_targets(
  File "/usr/local/lib/python3.9/dist-packages/dagster/_grpc/", line 43, in get_loadable_targets
    else loadable_targets_from_python_module(module_name, working_directory)
  File "/usr/local/lib/python3.9/dist-packages/dagster/_core/workspace/", line 42, in loadable_targets_from_python_module
    return loadable_targets_from_loaded_module(module)
  File "/usr/local/lib/python3.9/dist-packages/dagster/_core/workspace/", line 134, in loadable_targets_from_loaded_module
    raise DagsterInvariantViolationError(

2023-01-11 19:59:46 +0000 - dagit - INFO - Serving dagit on <> in process 228
from the docs:
1. dagit (works if .workspace.yaml exists)
2. dagit -w path/to/workspace.yaml
if i run dagit inside the project file it works -- but there is no
file if i try to run
dagit -w ./projectfile
it doesn't work
welp i'll just use
(cd ./testing ; dagit)
in case anyone needs:
podman rm dagit
podman run \
--name dagit \
-p 3003:3000 \
-v ~/apps/dagster/:/app/ \
--entrypoint "" \
dag:bld /bin/sh -c "(cd /app/$(cat ~/apps/dagster/PROJECT_NAME)/ ; dagit )"
podman ps