Skip to content

Explicitly set image platform in Dockerfile #155

@WouterSpaak

Description

@WouterSpaak

When running the OMOTES system on Macbook M4 Silicon, the following warnings are being reported by Docker:

 ! grow_worker_optimizer_with_pressure The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                 0.0s 
 ! grow_worker_optimizer_no_heat_losses The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                0.0s 
 ! omotes_simulator_worker The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                             0.0s 
 ! grow_worker_simulator The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                               0.0s 
 ! grow_worker_optimizer The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                               0.0s 
 ! orchestrator The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested     

This can be fixed by explicitly declaring the platform value to be linux/amd64 in docker-compose.yml files:

#snip
  grow_worker_optimizer: &grow_worker
    image: ghcr.io/project-omotes/omotes-grow-optimizer-worker:2.0.10
    **platform: linux/amd64**
    restart: unless-stopped
    deploy:
      replicas: 2
      resources:
        limits:
          cpus: "4"
          memory: 4gb
    memswap_limit: 4gb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions