* Deprecate 3.0 * 3.0 deprecation: remove 3.0 markup (#25647) * Remove liquid conditionals and content for 3.0 deprecation * Remove manually, no longer versioned in a supported version * Remove translations manually, no longer versioned in a supported version * Remove 'if', now in all supported versions * Remove dangling 'elseif', now in all supported versions * Remove dangling 'elseif' and 3.0 screenshot reference, now in all supported versions * Nudge to latest supported GHES version * Nudge to latest supported release GHES version * Bump all the version for the liquid tests * Bump first deprecated version for linting tests * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Prefer double quotes Co-authored-by: Laura Coursen <lecoursen@github.com> * Remove extra newline Co-authored-by: Laura Coursen <lecoursen@github.com> * Remove extra newline Co-authored-by: Laura Coursen <lecoursen@github.com> * Remove extra newline Co-authored-by: Laura Coursen <lecoursen@github.com> * One reusable per line Co-authored-by: Laura Coursen <lecoursen@github.com> * One reusable per line Co-authored-by: Laura Coursen <lecoursen@github.com> * One reusable per line Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Stray whitespace ✂️ Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Version check not needed anymore Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Just 'ghes' since we're deprecating 3.0 Co-authored-by: Laura Coursen <lecoursen@github.com> * Don't depend on hardcoded versions Co-authored-by: Laura Coursen <lecoursen@github.com> * Remove static files for 3.0 deprecation (#25649) Co-authored-by: Laura Coursen <lecoursen@github.com>
3.2 KiB
title, shortTitle, intro, permissions, versions, type, topics, product
| title | shortTitle | intro | permissions | versions | type | topics | product | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Setting a minimum specification for codespace machines | Set a minimum machine spec | You can avoid under-resourced machine types being used for {% data variables.product.prodname_codespaces %} for your repository. | People with write permissions to a repository can create or edit the codespace configuration. |
|
how_to |
|
{% data reusables.gated-features.codespaces %} |
Overview
When you create a codespace for a repository you are typically offered a choice of available machine types. Each machine type has a different level of resources. For more information, see "Changing the machine type for your codespace."
If your project needs a certain level of compute power, you can configure {% data variables.product.prodname_github_codespaces %} so that only machine types that meet these requirements are available for people to select. You configure this in the devcontainer.json file.
{% note %}
Important: Access to some machine types may be restricted at the organization level. Typically this is done to prevent people choosing higher resourced machines that are billed at a higher rate. If your repository is affected by an organization-level policy for machine types you should make sure you don't set a minimum specification that would leave no available machine types for people to choose. For more information, see "Restricting access to machine types."
{% endnote %}
Setting a minimum machine specification
-
{% data variables.product.prodname_codespaces %} for your repository are configured in the
devcontainer.jsonfile. If your repository does not already contain adevcontainer.jsonfile, add one now. See "Add a dev container to your project." -
Edit the
devcontainer.jsonfile, adding ahostRequirementsproperty such as this:"hostRequirements": { "cpus": 8, "memory": "8gb", "storage": "32gb" }You can specify any or all of the options:
cpus,memory, andstorage.To check the specifications of the {% data variables.product.prodname_codespaces %} machine types that are currently available for your repository, step through the process of creating a codespace until you see the choice of machine types. For more information, see "Creating a codespace."
-
Save the file and commit your changes to the required branch of the repository.
Now when you create a codespace for that branch of the repository you will only be able to select machine types that match or exceed the resources you've specified.
