Skip to content

Conversation

@KevKibe
Copy link
Contributor

@KevKibe KevKibe commented Feb 20, 2024

Fixes #915
Restructured into sections:

  • Introduction
  • Overview of steps
  • Adding cloud provider to gpuhunt
  • Intergrating a cloud provider to dstack
    • Setup and Initial Configuration
    • Modifying setup.py
    • Extending Backend Models
    • Configuration Models
    • Finalizing Integration
  • Appendix

@KevKibe
Copy link
Contributor Author

KevKibe commented Feb 22, 2024

@Egor-S Requested changes made.

- API for creating and terminating containers
- Safe imports

Examples: Amazon Elastic Container Service(ECS), Google Cloud Run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't support these. There should be kubernetes and vastai

To speed up provisioning, we prebuild VM images with necessary dependencies, available in `packer/`.

### Adding Docker-only compute backend
Examples: Microsoft Azure, AWS, Google Cloud Platform
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use dstack internal names. azure, gcp, etc.

- cloud-init script (preferable)
- cloud-init script (preferred)
- API for creating and terminating instances
- Safe imports
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess my previous comment was not clear, my bad. It should not be there, because it has nothing to do with backends, only Python code in dstack itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still unclear, I had safe imports originally under finalising integration this way:
Add a safe import for your backend in src/dstack/_internal/server/services/backends/__init__.py
Should this change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This quote is correct, it should stay. Safe imports are related to this exact file (src/dstack/_internal/server/services/backends/__init__.py).

@KevKibe
Copy link
Contributor Author

KevKibe commented Feb 22, 2024

@Egor-S Changes made

@peterschmidt85 peterschmidt85 merged commit 5be4b05 into dstackai:master Feb 23, 2024
@peterschmidt85
Copy link
Contributor

@KevKibe I've merged the pull request.
Also, I had to rework the style and add TODOs: 2b52fe7

The document is work in progress and will require more changes in the future.
In case you have feedback, please share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Contribution Guide How-to-add-a-backend for Clarity and Efficiency

3 participants