Git Product home page Git Product logo

Comments (3)

garethbrickman avatar garethbrickman commented on August 25, 2024

In your dagster.yaml file, could you try adding an image key under config to specify which Docker image to use when launching runs. This image should be the one that contains your Dagster user code.

Example:

run_launcher:
  module: dagster_docker
  class: DockerRunLauncher
  config:
    image: "your_image_name:your_tag"  # Replace with your actual image name and tag if it haso ne
    env_vars:
      - DAGSTER_POSTGRES_USER
      - DAGSTER_POSTGRES_PASSWORD
      - DAGSTER_POSTGRES_DB
    network: dagster_network
    container_kwargs:
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /tmp/io_manager_storage:/tmp/io_manager_storage

from dagster.

seanpden avatar seanpden commented on August 25, 2024

Added the image: dagster-user-code key and value to the dagster.yaml file and the output remains the same.

from dagster.

seanpden avatar seanpden commented on August 25, 2024

Wanted to update: I fixed the issue I was having by removing any quotation marks around the "DAGSTER_CURRENT_IMAGE" environment variable in the compose.yaml file. The "dagster_user_code" service now looks like this:

  dagster_user_code:
    build:
      context: .
      dockerfile: ./dockerfile_user_code
    container_name: dagster_user_code
    image: dagster_user_code
    environment:
      - DAGSTER_POSTGRES_USER=${POSTGRES_USER}
      - DAGSTER_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - DAGSTER_POSTGRES_DB=${POSTGRES_DB}
      - DAGSTER_CURRENT_IMAGE=dagster_user_code # THIS WAS THE PROBLEM - ORIGINAL VALUE: '"dagster-user-code"'
    ports:
      - 4000:4000
    networks:
        - dagster_network

While this fixed my immediate problem, I believe this issue should remain open. At work, I am using quotations - like this:

 dagster_user_code:
    build:
      context: .
      dockerfile: ./Dockerfile_user_code
    container_name: docker_user_code
    image: docker_user_code_image
    ports:
      - 4000:4000
    networks:
      - docker_example_network
    environment:
      DAGSTER_POSTGRES_USER: "postgres_user"
      DAGSTER_POSTGRES_PASSWORD: "postgres_password"
      DAGSTER_POSTGRES_DB: "postgres_db"
      DAGSTER_CURRENT_IMAGE: "docker_user_code_image" # <<< RIGHT HERE

That code snippet works in my work environment. I'm not sure which is supposed to be correct, but I can't imagine it is working as intended.

from dagster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.