# Overview Source: https://docs.gpuhub.com/ai-gateway/ai-gateway Access GPUhub-hosted open-source models and route requests to closed-source models through one unified AI gateway. You can call supported models through a compatible API, monitor usage, and pay based on actual consumption. ![Claude Code](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-claude-code-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=619cd3f258c8dfc724b94ac2b85f2721) ![ChatGPT](https://mintcdn.com/gpuhub/szsKW_2Y2u2gI8Hg/images/ide-agents-chatgpt-icon.png?fit=max\&auto=format\&n=szsKW_2Y2u2gI8Hg\&q=85\&s=f81f568247a8fba9b94aea35b4993b51) ![Codex](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-codex-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=e58c40da00bcc781ce797aeb90912b10) ![Gemini](https://mintcdn.com/gpuhub/szsKW_2Y2u2gI8Hg/images/ide-agents-gemini-icon.png?fit=max\&auto=format\&n=szsKW_2Y2u2gI8Hg\&q=85\&s=38f930a55beb4669c5dbf334ac1578e2) ![GLM](https://mintcdn.com/gpuhub/QVKtRg06DOo-ILOw/images/ide-agents-glm-icon.png?fit=max\&auto=format\&n=QVKtRg06DOo-ILOw\&q=85\&s=d67680207ed1c82e36ae43b1eab90d06) ![DeepSeek](https://mintcdn.com/gpuhub/szsKW_2Y2u2gI8Hg/images/ide-agents-deepseek-icon.png?fit=max\&auto=format\&n=szsKW_2Y2u2gI8Hg\&q=85\&s=5757caf5876c27e9c4f41992f30470b7) ![Qwen](https://mintcdn.com/gpuhub/szsKW_2Y2u2gI8Hg/images/ide-agents-qwen-icon.png?fit=max\&auto=format\&n=szsKW_2Y2u2gI8Hg\&q=85\&s=548de5f1fff11d866ca0849d0af50155) ![MiniMax](https://mintcdn.com/gpuhub/szsKW_2Y2u2gI8Hg/images/ide-agents-minimax-icon.png?fit=max\&auto=format\&n=szsKW_2Y2u2gI8Hg\&q=85\&s=5239692aeda633a69eea42bf332afd80) > [!NOTE] > > Model availability, context length, and final prices may vary by model. Use the prices displayed in the console as the source of truth before starting production traffic. ## Supported Model Types AI Gateway supports multiple categories of models for common AI workloads. | Model Type | Typical Use Cases | Billing Unit | | - | - | - | | Language models | Chat, reasoning, coding, summarization, tool calling, and structured output | Input and output tokens | | Long-context language models | Document analysis, large codebase analysis, and retrieval-augmented generation | Input and output tokens, sometimes tiered by context size | | Claude-series models | Chat, coding, reasoning, and workflows that use prompt caching | Input tokens, output tokens, cache writes, and cache reads | ## Pricing **AI Gateway provides two service plans**: Enterprise for production workloads and Developer for individual or experimental use. Model prices are listed in USD. Always use the unit prices displayed in the console as the source of truth. > **Enterprise** > > Production-grade API access for enterprise workloads, with priority capacity, higher service stability, and dedicated support. Suitable for commercial applications, high-volume usage, and business-critical AI services. > **Developer** > > Affordable API access for individual developers, testing, and non-critical workloads. Powered by shared capacity, with best-effort availability and performance that may vary depending on resource availability. ![](https://mintcdn.com/gpuhub/CYYSiRgUWABjTblG/images/ai-gateway-token.png?fit=max\&auto=format\&n=CYYSiRgUWABjTblG\&q=85\&s=500c08f50f2d4b419002769fa41e293e) > [!NOTE] > > The prices below are placeholders used to illustrate each billing formula. They do not represent actual model prices. ### Language Models General language models are billed by token usage. | Usage Type | Unit Price | | - | - | | Input tokens | `$XX.XX` / 1M tokens | | Output tokens | `$YY.YY` / 1M tokens | Billing formula: ```text theme={null} Total cost = (input tokens / 1,000,000 × $XX.XX) + (output tokens / 1,000,000 × $YY.YY) ``` ### Tiered Context Pricing Some language models select a pricing tier based on the total number of input tokens in a request. After the tier is selected, its input and output prices apply to the entire request. | Context Tier | Input Tokens per Request | Input Token Price | Output Token Price | | - | - | - | - | | Standard context | Up to the model's tier threshold | `$XX.XX` / 1M tokens | `$YY.YY` / 1M tokens | | Extended context | Above the model's tier threshold | `$AA.AA` / 1M tokens | `$BB.BB` / 1M tokens | Standard-context formula: ```text theme={null} Total cost = (input tokens / 1,000,000 × $XX.XX) + (output tokens / 1,000,000 × $YY.YY) ``` Extended-context formula: ```text theme={null} Total cost = (input tokens / 1,000,000 × $AA.AA) + (output tokens / 1,000,000 × $BB.BB) ``` The exact threshold and prices vary by model and are displayed in the console. ### Claude-Series Prompt Caching Claude-series models may include prompt caching charges in addition to normal input and output token charges. | Usage Type | Unit Price | | - | - | | Input tokens | `$XX.XX` / 1M tokens | | Output tokens | `$YY.YY` / 1M tokens | | Cache write, 5-minute TTL | `$MM.MM` / 1M tokens | | Cache write, 1-hour TTL | `$NN.NN` / 1M tokens | | Cache read | `$ZZ.ZZ` / 1M tokens | Billing formula: ```text theme={null} Total cost = (input tokens / 1,000,000 × $XX.XX) + (output tokens / 1,000,000 × $YY.YY) + (5-minute cache write tokens / 1,000,000 × $MM.MM) + (1-hour cache write tokens / 1,000,000 × $NN.NN) + (cache read tokens / 1,000,000 × $ZZ.ZZ) ``` ## Usage Notes * Check the console for the latest model list, supported parameters, context limits, and real-time prices. * For language models, estimate cost from both input and output tokens. Long prompts, retrieved documents, and tool results can increase input token usage. * For tiered-context models, the input token count determines which price pair applies to the entire request. * For cached prompts, cache writes and cache reads may appear as separate billable usage types. * Use rate limits and budget controls when integrating AI Gateway into production applications. # Cherry Studio Source: https://docs.gpuhub.com/ai-gateway/ides-agents/cherry-studio Configure Cherry Studio to use AI Gateway models across Anthropic, OpenAI-compatible, Responses, and Gemini-compatible providers. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-cherry-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=8e6afd2905f11295884ceae7e70be7fe) Cherry Studio can connect to AI Gateway through different provider types depending on the model family you want to use. > [!NOTE] > > Create or copy your API key from the console before configuring Cherry Studio. ## Claude-Series Models Use the Anthropic-compatible provider for Claude-series models. 1. Add a new provider in Cherry Studio. 2. Choose the Anthropic-compatible provider type. 3. Use the AI Gateway Anthropic-compatible endpoint. | Field | Value | | - | - | | Provider type | Anthropic-compatible | | API URL | `https://llm.gpuhub.com/api/v1/anthropic/v1` | | API Key | Your AI Gateway API key | | Model example | `claude-sonnet-4-6` | ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-cherry-studio-anthropic-provider.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=598aec89c3d40fef1f42beaa7baaf048) ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cherry-studio-anthropic-config.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=55451e681d8f96b050afa1f2cb87175b) ## OpenAI Responses Models For OpenAI-series models that use the Responses API, select the OpenAI Responses provider type when available. | Field | Value | | - | - | | Provider type | OpenAI Responses | | API URL | `https://llm.gpuhub.com/api/v1` | | API Key | Your AI Gateway API key | | Model examples | `gpt-5.3-codex`, `gpt-5.4`, `gpt-5.5` | ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-cherry-studio-responses-provider.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=ad460d3bf3f2fcf8ca947993001dfda8) ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cherry-studio-responses-config.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=9411e090f3d1f16401bda361c807104c) ## Gemini-Series Models Use the Gemini provider type for Gemini-compatible models. | Field | Value | | - | - | | Provider type | Gemini | | API URL | `https://llm.gpuhub.com/api/v1/gemini/v1beta` | | API Key | Your AI Gateway API key | | Model example | `gemini-3.1-pro-preview` | ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-cherry-studio-gemini-provider.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=a4dc66059e3d6639db6e76b395ab8c9d) ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cherry-studio-gemini-config.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=56c8acc851cfaed4ad66e300478a7b0f) ## OpenAI-Compatible Models Use the OpenAI provider type for models that support the OpenAI Chat Completions interface, such as GLM, DeepSeek, MiniMax, and Qwen models. | Field | Value | | - | - | | Provider type | OpenAI | | API URL | `https://llm.gpuhub.com/api/v1` | | API Key | Your AI Gateway API key | | Model examples | `GLM-5`, `DeepSeek-V3.2`, `MiniMax-M2.5`, `Qwen3.5-397B-A17B` | ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cherry-studio-openai-completions-provider.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=14247bb88be3342194ba63bc67df5d56) ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cherry-studio-openai-completions-config.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=5f87f10d487c35974f0e3068e51d4693) # Claude Code Source: https://docs.gpuhub.com/ai-gateway/ides-agents/claude-code Configure Claude Code to use AI Gateway through the Anthropic-compatible endpoint. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-claude-code-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=619cd3f258c8dfc724b94ac2b85f2721) Claude Code can use AI Gateway through the Anthropic-compatible API endpoint. Configure the base URL and API key before starting Claude Code. > [!NOTE] > > Create or copy your API key from the console before configuring Claude Code. ## Configure Environment Variables ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm.gpuhub.com/api/v1/anthropic export ANTHROPIC_AUTH_TOKEN=$API_KEY ``` If you do not specify a model, Claude Code uses the default model configured by the gateway. You can also route Claude Code model aliases to a specific model. ```bash theme={null} export ANTHROPIC_DEFAULT_HAIKU_MODEL=GLM-5 export ANTHROPIC_DEFAULT_SONNET_MODEL=GLM-5 export ANTHROPIC_DEFAULT_OPUS_MODEL=GLM-5 ``` ## Start Claude Code After the environment variables are set, start Claude Code from your project directory. ```bash theme={null} claude ``` # Codex Source: https://docs.gpuhub.com/ai-gateway/ides-agents/codex Configure Codex to use AI Gateway with an OpenAI-compatible API endpoint. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-codex-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=e58c40da00bcc781ce797aeb90912b10) Codex is a command-line coding assistant. You can route Codex requests through AI Gateway by configuring the OpenAI-compatible base URL and providing your API key. > [!NOTE] > > Create or copy your API key from the console before starting Codex. ## Recommended: Manage Config with cc switch ![](https://mintcdn.com/gpuhub/szsKW_2Y2u2gI8Hg/images/ide-agents-cc-switch-icon.png?fit=max\&auto=format\&n=szsKW_2Y2u2gI8Hg\&q=85\&s=0d2c1cc15db4daf4a8aee487b7e87506) If you use multiple coding agents, consider using [**cc switch**](https://github.com/farion1231/cc-switch) or a similar profile manager to maintain separate configurations for Codex, Claude Code, and other tools. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-codex-cc-switch-01.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=30fc41ca12d79c15ae2f6c6f15bb3498) ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-codex-cc-switch-02.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=845c6c670f91063d20b87f2de13a537f) ## Configure the API Base URL Set the OpenAI-compatible base URL before starting Codex. ```bash theme={null} export OPENAI_BASE_URL=https://llm.gpuhub.com/api/v1 ``` To make this persistent, add it to your shell profile. ```bash theme={null} echo 'export OPENAI_BASE_URL=https://llm.gpuhub.com/api/v1' >> ~/.zshrc ``` ## Start Codex ```bash theme={null} codex ``` ## Provide Your API Key When Codex opens the authentication menu, choose `Provide your own API key`. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-codex-login-method.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=4a470c00b86a2a4b67d2c5d98586af57) Paste your API key into the prompt and press Enter to save it. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-codex-api-key.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=a5a011de01e254df8c5ec22cfb7c1143) ## Start Using Codex After configuration is complete, you can use Codex from the terminal for code generation, explanation, debugging, and refactoring tasks. # Cursor Source: https://docs.gpuhub.com/ai-gateway/ides-agents/cursor Configure Cursor to call AI Gateway models with a custom OpenAI-compatible model provider. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-cursor-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=3111fea4865386415a5f5a4f9ae37483) Cursor can call AI Gateway models through a custom OpenAI-compatible provider. Cursor Free may only support Auto mode; use Cursor Pro or a higher plan if custom model providers are required. > [!WARNING] > > Cursor may fuzzy-match custom model names against built-in model names. If a custom model name overlaps with a built-in model name, Cursor may route the request to its own provider instead of AI Gateway. ## Configure a Custom Model Use the following values when adding a custom provider or model in Cursor. | Field | Value | | - | - | | API Key | Your AI Gateway API key | | Base URL | `https://llm.gpuhub.com/api/v1` | | Model name | A custom alias such as `gpuhub-model` | ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cursor-provider-settings.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=d5a4ac301ea910cd0d6ea8b44e0a55c3) ## Avoid Built-In Model Name Matching If you want to use a model such as `gpt-5.4`, avoid naming the Cursor custom model `gpt-5.4` directly. Use an unrelated alias such as `gpuhub-model`, then map that alias to the target model in the AI Gateway model settings. ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-cursor-model-mapping.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=bc1a1a826b74968b750a06bd5b8718c1) ## Recommended Flow 1. Create a custom model alias in Cursor, such as `gpuhub-model`. 2. Set the Base URL to `https://llm.gpuhub.com/api/v1`. 3. Enter your API key. 4. Map `gpuhub-model` to the target AI Gateway model in the console. 5. Select `gpuhub-model` in Cursor when starting a chat or coding task. # Trae Source: https://docs.gpuhub.com/ai-gateway/ides-agents/trae Configure Trae IDE to call AI Gateway models through the Roo Code extension. ![](https://mintcdn.com/gpuhub/GEB8Gf9uDczdNFr-/images/ide-agents-trae-icon.png?fit=max\&auto=format\&n=GEB8Gf9uDczdNFr-\&q=85\&s=7c5f27fea4a7dfa3084e5b0f2d6b2511) Native Trae does not directly support external model providers. You can use external model APIs by installing the Roo Code extension and configuring AI Gateway as an OpenAI-compatible provider. ## Install Roo Code Open the Trae extension marketplace, search for `Roo Code`, and install the extension. ## Configure the Model API When selecting an API provider, choose `OpenAI Compatible`. If you want to use Claude-series models, still choose `OpenAI Compatible` and use the OpenAI-compatible endpoint provided by AI Gateway. | Field | Value | | - | - | | API Provider | `OpenAI Compatible` | | Base URL | `https://llm.gpuhub.com/api/v1` | | API Key | Your AI Gateway API key | | Model | The target model name, such as `GLM-5` or `claude-sonnet-4-6` | ![](https://mintcdn.com/gpuhub/okogEM35aUTWSg4p/images/ide-agents-trae-roo-code-config.png?fit=max\&auto=format\&n=okogEM35aUTWSg4p\&q=85\&s=c01a32486f5d6847c30cde91e17c4074) ## Context Length If requests fail because of context length settings, adjust the context length in the extension configuration to match the selected model. # claude-opus-4-6 Source: https://docs.gpuhub.com/ai-gateway/llms/claude-opus-4-6 Use Claude Opus 4.6 through AI Gateway for general-purpose Anthropic-compatible workloads. `claude-opus-4-6` is an Anthropic Claude Opus 4.6 model routed through AI Gateway. Unlike the Claude Code-only variant, this model can be used for general chat, coding, reasoning, and other supported Anthropic-compatible workloads. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoints | Compatibility | Base URL | | - | - | | Anthropic-compatible | `https://llm.gpuhub.com/api/v1/anthropic` | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## Claude Code ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm.gpuhub.com/api/v1/anthropic export ANTHROPIC_AUTH_TOKEN=$API_KEY # Optional: route Claude Code model aliases to this model. export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-opus-4-6 export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-opus-4-6 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6 ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install anthropic from anthropic import Anthropic client = Anthropic( api_key="YOUR_API_KEY", base_url="https://llm.gpuhub.com/api/v1/anthropic", ) message = client.messages.create( model="claude-opus-4-6", max_tokens=1024, messages=[ {"role": "user", "content": "Hello! Please introduce yourself briefly."} ], ) print(message.content[0].text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # claude-opus-4-6-cc Source: https://docs.gpuhub.com/ai-gateway/llms/claude-opus-4-6-cc Use the Claude Opus 4.6 Claude Code variant through AI Gateway. `claude-opus-4-6-cc` is the Claude Code-focused variant of Anthropic Claude Opus 4.6. Use `claude-opus-4-6` instead when you need the general-purpose model for non-Claude Code scenarios. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoints | Compatibility | Base URL | | - | - | | Anthropic-compatible | `https://llm.gpuhub.com/api/v1/anthropic` | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## Claude Code ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm.gpuhub.com/api/v1/anthropic export ANTHROPIC_AUTH_TOKEN=$API_KEY # Optional: route Claude Code model aliases to this model. export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-opus-4-6-cc export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-opus-4-6-cc export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6-cc ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install anthropic from anthropic import Anthropic client = Anthropic( api_key="YOUR_API_KEY", base_url="https://llm.gpuhub.com/api/v1/anthropic", ) message = client.messages.create( model="claude-opus-4-6-cc", max_tokens=1024, messages=[ {"role": "user", "content": "Hello! Please help me plan a coding task."} ], ) print(message.content[0].text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # claude-opus-4-8 Source: https://docs.gpuhub.com/ai-gateway/llms/claude-opus-4-8 Use Claude Opus 4.8 through AI Gateway for general-purpose Anthropic-compatible workloads. `claude-opus-4-8` is an Anthropic Claude Opus 4.8 model routed through AI Gateway. It can be used for general chat, coding, reasoning, and other supported Anthropic-compatible workloads. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoints | Compatibility | Base URL | | - | - | | Anthropic-compatible | `https://llm.gpuhub.com/api/v1/anthropic` | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## Claude Code ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm.gpuhub.com/api/v1/anthropic export ANTHROPIC_AUTH_TOKEN=$API_KEY # Optional: route Claude Code model aliases to this model. export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-opus-4-8 export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-opus-4-8 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-8 ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install anthropic from anthropic import Anthropic client = Anthropic( api_key="YOUR_API_KEY", base_url="https://llm.gpuhub.com/api/v1/anthropic", ) message = client.messages.create( model="claude-opus-4-8", max_tokens=1024, messages=[ {"role": "user", "content": "Hello! Please introduce yourself briefly."} ], ) print(message.content[0].text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # claude-sonnet-4-6 Source: https://docs.gpuhub.com/ai-gateway/llms/claude-sonnet-4-6 Use Claude Sonnet 4.6 through AI Gateway for general-purpose Anthropic-compatible workloads. `claude-sonnet-4-6` is an Anthropic Claude Sonnet 4.6 model routed through AI Gateway. Unlike the Claude Code-only variant, this model can be used for general chat, coding, reasoning, and other supported Anthropic-compatible workloads. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoints | Compatibility | Base URL | | - | - | | Anthropic-compatible | `https://llm.gpuhub.com/api/v1/anthropic` | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## Claude Code ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm.gpuhub.com/api/v1/anthropic export ANTHROPIC_AUTH_TOKEN=$API_KEY # Optional: route Claude Code model aliases to this model. export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-sonnet-4-6 export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-6 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-sonnet-4-6 ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install anthropic from anthropic import Anthropic client = Anthropic( api_key="YOUR_API_KEY", base_url="https://llm.gpuhub.com/api/v1/anthropic", ) message = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, messages=[ {"role": "user", "content": "Hello! Summarize the benefits of prompt caching."} ], ) print(message.content[0].text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # claude-sonnet-4-6-cc Source: https://docs.gpuhub.com/ai-gateway/llms/claude-sonnet-4-6-cc Use the Claude Sonnet 4.6 Claude Code variant through AI Gateway. `claude-sonnet-4-6-cc` is the Claude Code-focused variant of Anthropic Claude Sonnet 4.6. Use `claude-sonnet-4-6` instead when you need the general-purpose model for non-Claude Code scenarios. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoints | Compatibility | Base URL | | - | - | | Anthropic-compatible | `https://llm.gpuhub.com/api/v1/anthropic` | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## Claude Code ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm.gpuhub.com/api/v1/anthropic export ANTHROPIC_AUTH_TOKEN=$API_KEY # Optional: route Claude Code model aliases to this model. export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-sonnet-4-6-cc export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-6-cc export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-sonnet-4-6-cc ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install anthropic from anthropic import Anthropic client = Anthropic( api_key="YOUR_API_KEY", base_url="https://llm.gpuhub.com/api/v1/anthropic", ) message = client.messages.create( model="claude-sonnet-4-6-cc", max_tokens=1024, messages=[ {"role": "user", "content": "Hello! Review this implementation plan."} ], ) print(message.content[0].text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # DeepSeek-R1-0528 Source: https://docs.gpuhub.com/ai-gateway/llms/deepseek-r1-0528 Use DeepSeek-R1-0528 through AI Gateway with an OpenAI-compatible chat completions API. `DeepSeek-R1-0528` is available through the OpenAI-compatible chat completions API. It is suitable for reasoning-heavy tasks, problem solving, coding assistance, and step-by-step analysis. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "DeepSeek-R1-0528", "messages": [ { "role": "user", "content": "Hello! Please solve this reasoning problem step by step." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="DeepSeek-R1-0528", messages=[ {"role": "user", "content": "Hello! Please solve this reasoning problem step by step."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # DeepSeek-V3.2 Source: https://docs.gpuhub.com/ai-gateway/llms/deepseek-v3-2 Use DeepSeek-V3.2 through AI Gateway with an OpenAI-compatible chat completions API. `DeepSeek-V3.2` is available through the OpenAI-compatible chat completions API. It is suitable for general chat, coding assistance, knowledge tasks, and application backends that need an OpenAI-compatible interface. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "DeepSeek-V3.2", "messages": [ { "role": "user", "content": "Hello! Please summarize the following technical document." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="DeepSeek-V3.2", messages=[ {"role": "user", "content": "Hello! Please summarize the following technical document."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # gemini-3.1-pro-preview Source: https://docs.gpuhub.com/ai-gateway/llms/gemini-3-1-pro-preview Use gemini-3.1-pro-preview through AI Gateway with the Google GenAI SDK. `gemini-3.1-pro-preview` is available through the Gemini-compatible AI Gateway endpoint. It is suitable for advanced reasoning, analysis, and multimodal-ready application workflows when supported by the selected model configuration. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | Gemini-compatible | `https://www.autodl.art/api/v1/gemini/v1beta/models` | Some tools may require the versioned base URL: ```text theme={null} https://www.autodl.art/api/v1/gemini/v1beta/models ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install google-genai from google import genai client = genai.Client( api_key="YOUR_API_KEY", http_options={"base_url": "https://www.autodl.art/api/v1/gemini/v1beta/models"}, ) response = client.models.generate_content( model="gemini-3.1-pro-preview", contents="Hello! Please summarize the key tradeoffs of long-context models.", ) print(response.text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # GLM-5 Source: https://docs.gpuhub.com/ai-gateway/llms/glm-5 Use GLM-5 through AI Gateway with an OpenAI-compatible chat completions API. `GLM-5` is available through the OpenAI-compatible chat completions API. It is suitable for chat, reasoning, coding assistance, document understanding, and Chinese-English application workflows. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "GLM-5", "messages": [ { "role": "user", "content": "Hello! Please explain how to evaluate an LLM application." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="GLM-5", messages=[ {"role": "user", "content": "Hello! Please explain how to evaluate an LLM application."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # GLM-5.1 Source: https://docs.gpuhub.com/ai-gateway/llms/glm-5-1 Use GLM-5.1 through AI Gateway with an OpenAI-compatible chat completions API. `GLM-5.1` is available through the OpenAI-compatible chat completions API. It is suitable for chat, reasoning, coding assistance, document understanding, and Chinese-English application workflows. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "GLM-5.1", "messages": [ { "role": "user", "content": "Hello! Please compare two deployment strategies for an AI service." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="GLM-5.1", messages=[ {"role": "user", "content": "Hello! Please compare two deployment strategies for an AI service."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # gpt-5.3-codex Source: https://docs.gpuhub.com/ai-gateway/llms/gpt-5-3-codex Use gpt-5.3-codex through AI Gateway with the OpenAI Responses API. `gpt-5.3-codex` is available through the OpenAI-compatible Responses API. It is suitable for coding workflows, software engineering agents, code understanding, and implementation planning. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/responses" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "gpt-5.3-codex", "input": "Hello! Help me refactor this function." }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) response = client.responses.create( model="gpt-5.3-codex", input="Hello! Help me refactor this function.", ) print(response.output_text) ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # gpt-5.4 Source: https://docs.gpuhub.com/ai-gateway/llms/gpt-5-4 Use gpt-5.4 through AI Gateway with an OpenAI-compatible chat completions API. `gpt-5.4` is available through the OpenAI-compatible chat completions API. It is suitable for chat, reasoning, writing, coding assistance, and tool-oriented application workflows. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "gpt-5.4", "messages": [ { "role": "user", "content": "Hello! Please introduce yourself briefly." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="gpt-5.4", messages=[ {"role": "user", "content": "Hello! Please introduce yourself briefly."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # gpt-5.5 Source: https://docs.gpuhub.com/ai-gateway/llms/gpt-5-5 Use gpt-5.5 through AI Gateway with an OpenAI-compatible chat completions API. `gpt-5.5` is available through the OpenAI-compatible chat completions API. It is suitable for chat, reasoning, writing, coding assistance, and tool-oriented application workflows. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "gpt-5.5", "messages": [ { "role": "user", "content": "Hello! Please help me design an evaluation plan." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="gpt-5.5", messages=[ {"role": "user", "content": "Hello! Please help me design an evaluation plan."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # MiniMax-M2.5 Source: https://docs.gpuhub.com/ai-gateway/llms/minimax-m2-5 Use MiniMax-M2.5 through AI Gateway with an OpenAI-compatible chat completions API. `MiniMax-M2.5` is available through the OpenAI-compatible chat completions API. It is suitable for chat, reasoning, writing, coding assistance, and agent-style application workflows. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "MiniMax-M2.5", "messages": [ { "role": "user", "content": "Hello! Please draft a short product announcement." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="MiniMax-M2.5", messages=[ {"role": "user", "content": "Hello! Please draft a short product announcement."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # Qwen3.5-397B-A17B Source: https://docs.gpuhub.com/ai-gateway/llms/qwen3-5-397b-a17b Use Qwen3.5-397B-A17B through AI Gateway with an OpenAI-compatible chat completions API. `Qwen3.5-397B-A17B` is available through the OpenAI-compatible chat completions API. It is suitable for large-scale reasoning, coding assistance, knowledge-intensive tasks, and multilingual application workflows. > [!NOTE] > > Create or copy your API key from the console before calling the API. Use the model unit price displayed in the console as the source of truth. ## Endpoint | Compatibility | Base URL | | - | - | | OpenAI-compatible | `https://llm.gpuhub.com/api/v1` | ## curl ```bash theme={null} curl --location --request POST "https://llm.gpuhub.com/api/v1/chat/completions" \ --header "Authorization: Bearer $API_KEY" \ --header "Content-Type: application/json" \ --data-raw '{ "model": "Qwen3.5-397B-A17B", "messages": [ { "role": "user", "content": "Hello! Please create a concise project risk checklist." } ], "stream": true }' ``` ## Python ```python theme={null} # Install the SDK first if needed: # pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gpuhub.com/api/v1", api_key="YOUR_API_KEY", ) stream = client.chat.completions.create( model="Qwen3.5-397B-A17B", messages=[ {"role": "user", "content": "Hello! Please create a concise project risk checklist."} ], stream=True, ) for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="") ``` ## Use with Cherry Studio To use this model in Cherry Studio, configure the matching provider type and add the model name shown on this page. See [Cherry Studio](/ai-gateway/ides-agents/cherry-studio) for setup details. # Authentication Source: https://docs.gpuhub.com/api-reference/api-authentication Create a token at GPUhub Console and use it for authentication. > [!NOTE] > > The HOST address for the API server is: > > ``` > https://api.gpuhub.com/ > ``` ## Authentication Create a token at Console → Settings → Tokens and use it for authentication. ![](https://mintcdn.com/gpuhub/YJFV8Ev7jfoYgQiT/images/setting-token.png?fit=max\&auto=format\&n=YJFV8Ev7jfoYgQiT\&q=85\&s=419adbcb6cca5e04db48ed39dbadeb61) ```javascript theme={null} headers = {"Authorization": "your token"} ``` # Elastic Deployment API Source: https://docs.gpuhub.com/api-reference/api-elastic-deployment GPUhub Elastic Deployment API: A simple, token-authenticated REST API that lets any user programmatically create, scale, monitor, and manage pay-per-second GPU containers for AI/ML workloads. > [!WARNING] > > Note: API operations are not supported for on-demand GPU instances. All API features are designed for Elastic Deployment only. ## 1. List Private Images ### → Request ``` POST /api/v1/dev/image/private/list ``` ```json Request Body theme={null} { "page_index": 1, "page_size": 10 } ``` ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data.list` | List | List of image objects | `response` Object Fields | Parameter | Type | Description | | - | - | - | | `id` | Int | Image ID | | `image_name` | String | Image name | | `image_uuid` | String | Image UUID (used when creating deployments) | ```json Response (on success) theme={null} { "code": "Success", "msg": "" "data": { "list": [ { "id": 111, "created_at": "2022-01-20T18:34:08+08:00", "updated_at": "2022-01-20T18:34:08+08:00", "image_uuid": "image-db8346e037", "image_name": "image name", "status": "finished", } ], "page_index": 1, "page_size": 10, "max_page": 1, "offset": 0, }, } ``` ```python Python theme={null} import requests headers = { "Authorization": "your token", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/image/private/list" body = { "page_index": 1, "page_size": 10, } response = requests.post(url, json=body, headers=headers) print(response.content.decode()) ``` ## 2. Create Deployment ### → Request ``` POST /api/v1/dev/deployment ``` Place all parameters in the request body. Details are as follows: | Parameter | Type | Required | Description | | - | - | - | - | | `name` | String | Yes | Deployment name | | `deployment_type` | String | Yes | Deployment type: `ReplicaSet`, `Job`, or `Container` | | `replica_num` | Int | Required for ReplicaSet & Job | Desired number of container replicas | | `parallelism_num` | Int | Required for Job only | Max number of containers running in parallel (for Job type) | | `reuse_container` | Bool | No | Whether to reuse stopped containers (significantly speeds up creation). Default: `false` | | `reuse_container_scope` | String | No | Scope of reuse: `all` (account-wide) or `deployment` (current deployment only). Default: `all` | | `service_6006_port_protocol` | String | No | Protocol for port 6006 mapping: `http` or `tcp.` Default: `http` | | `service_6008_port_protocol` | String | No | Protocol for port 6008 mapping: `http` or `tcp.` Default: `http` | | `container_template` | Container Object | Yes | Container template (see below) | `container_template` Object | Parameter | Type | Required | Description | | - | - | - | - | | `dc_list` | `list` | Yes | List of available regions (data centers). See Appendix for values | | `cuda_v_from` | Int | Yes | Minimum CUDA version supported by driver (e.g., `118` = CUDA 11.8). See Appendix | | `cuda_v_to` | Int | Yes | Maximum CUDA version (higher versions are backward compatible) | | `gpu_name_set` | `list` | Yes | Allowed GPU models (e.g., `["RTX 5090", "RTX Pro 6000"]`) | | `gpu_num` | Int | Yes | Number of GPUs per container | | `cpu_num_from` / `cpu_num_to` | Int | Yes | CPU core range (1 vCPU units) | | `memory_size_from` / `memory_size_to` | Int | Yes | Memory range in GB | | `price_from` / `price_to` | Int | Yes | Price range in USD \* 1000 (e.g., USD0.10/hr → `100`, USD9.00/hr → `9000`) | | `image_uuid` | String | Yes | UUID of your private image or public base image | | `cmd` | String | Yes | Startup command (executed when container starts) | | `cmd_before_shutdown` | String | No | Command executed before container stops (5-second timeout; forced stop on timeout) | ```json Request Body theme={null} { "name": "api-auto-created", "deployment_type": "ReplicaSet", "replica_num": 2, "reuse_container": true, "container_template": { "dc_list": ["Singpore-A", "Singapore-B"], "gpu_name_set": ["RTX 5090", "RTX Pro 6000"], "cuda_v_from": 130, "cuda_v_to": 999, "gpu_num": 1, "cpu_num_from": 4, "cpu_num_to": 64, "memory_size_from": 16, "memory_size_to": 256, "cmd": "python main.py", "price_from": 100, // base price: $0.10/hr "price_to": 9000, // base price: $9.00/hr "image_uuid": "base-image-ec1e9vdbd3" } } ``` ### ← Response ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": { "deployment_uuid": "833f1cd5a764fa3" } } ``` ```python Python theme={null} import requests headers = { "Authorization": "your token", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment" # Example 1: Create a ReplicaSet deployment (auto-scaling) body = { "name": "my-inference-service", "deployment_type": "ReplicaSet", "replica_num": 2, "reuse_container": True, "container_template": { "dc_list": ["Singpore-A", "Singapore-B"], "gpu_name_set": ["RTX 5090", "RTX Pro 6000"], "gpu_num": 1, "cuda_v_from": 118, "cuda_v_to": 128, "cpu_num_from": 4, "cpu_num_to": 64, "memory_size_from": 16, "memory_size_to": 256, "cmd": "python main.py", "price_from": 100, # $0.10/hr (price × 1000) "price_to": 9000, # $9.00/hr (price × 1000) "image_uuid": "image-xxxxxxxx" } } response = requests.post(url, json=body, headers=headers) print(response.content.decode()) # Example 2: Create a Job deployment (batch processing) { "name": "batch-training-job", "deployment_type": "Job", "replica_num": 4, "parallelism_num": 1, "reuse_container": True, "container_template": { "dc_list": ["Singpore-A"], "gpu_name_set": ["RTX 5090"], "gpu_num": 1, "cuda_v_from": 118, "cuda_v_to": 128, "cpu_num_from": 8, "cpu_num_to": 64, "memory_size_from": 32, "memory_size_to": 256, "cmd": "python train.py", "price_from": 100, "price_to": 9000, "image_uuid": "image-xxxxxxxx" } } # Example 3: Create a single Container deployment { "name": "debug-container", "deployment_type": "Container", "reuse_container": True, "container_template": { "dc_list": ["Singpore-A"], "gpu_name_set": ["RTX 5090"], "gpu_num": 1, "cuda_v": 118, "cpu_num_from": 4, "cpu_num_to": 32, "memory_size_from": 16, "memory_size_to": 128, "cmd": "sleep infinity", "price_from": 100, "price_to": 9000, "image_uuid": "image-xxxxxxxx" } } ``` ## 3. List Deployments ### → Request ``` POST /api/v1/dev/deployment/list ``` Place the following parameters in the request body: | Parameter | Type | Required | Description | | - | - | - | - | | `page_index` | Int | Yes | Page number (starting from 1) | | `page_size` | Int | Yes | Number of items per page | | `name` | String | No | Filter by exact deployment name (exact match only, no fuzzy search) | | `status` | String | No | Filter by deployment status: `running` → active deployments `stopped` → stopped deployments → leave empty to return all | | `deployment_uuid` | String | No | Filter by specific deployment UUID | ```json Request Body theme={null} { "page_index": 1, "page_size": 10, "name": "my-api", // optional: filter by exact deployment name "status": "running", // optional: "running" | "stopped" | empty (all) "deployment_uuid": "xxx" // optional: filter by deployment UUID } ``` ### ← Response The fields returned in each deployment object have the same meaning as the parameters used when creating the deployment. ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": { "list": [ { "id": 214, "uuid": "53a677bb3e281b8", "name": "xxxx", "deployment_type": "Container", "status": "stopped", "replica_num": 1, "parallelism_num": 1, "reuse_container": true, "starting_num": 0, "running_num": 0, "finished_num": 2, "image_uuid": "image-db8346e037", "template": { "dc_list": ["Singpore-A", "Singapore-B"], "gpu_name_set": ["RTX 5090"], "gpu_num": 1, "cpu_num_from": 1, "cpu_num_to": 100, "memory_size_from": 1073741824, "memory_size_to": 274877906944, "price_from": 100, "price_to": 9000, "cuda_v_from": 118, "cuda_v_to": 128, "cmd": "sleep 100" }, "price_estimates": 0, "created_at": "2023-01-05T20:34:07+08:00", "updated_at": "2023-01-05T20:34:07+08:00", "stopped_at": null } ], "page_index": 1, "page_size": 10, "offset": 0, "max_page": 1, "result_total": 3 } } ``` ## 4. Scale Replicas (ReplicaSet only) ### → Request ``` PUT /api/v1/dev/deployment/replica_num ``` Place the following parameters in the request body: | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_uuid` | String | Yes | UUID of the deployment to scale replicas for | | `replica_num` | Int | Yes | Desired number of replicas (must be greater than 0) | ```json Request Body theme={null} { "deployment_uuid": "53a677bb3e281b8", "replica_num": 3 } ``` ### ← Response | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | null | No data returned | ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": null } ``` ```python Python theme={null} import requests headers = { "Authorization": "your token", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment/replica_num" body = { "deployment_uuid": "5be3045703152b9", "replica_num": 16 } response = requests.put(url, json=body, headers=headers) print(response.json()) ``` ## 5. Stop Entire Deployment ### → Request ``` PUT /api/v1/dev/deployment/operate ``` Place the following parameters in the request body: | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_uuid` | String | Yes | UUID of the deployment to operate | | `operation` | String | Yes | Operation to perform: `stop` → stop the deployment `delete` → delete the deployment | ```json Request Body theme={null} { "deployment_uuid": "53a677bb3e281b8", "operation": "stop" } ``` ### ← Response | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | null | No data returned | ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": null } ``` ```python Python theme={null} import requests headers = { "Authorization": "your token", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment/operate" body = { "deployment_uuid": "5be3045703152b9", "operate": "stop" } response = requests.put(url, json=body, headers=headers) print(response.content.decode()) ``` ## 6. Delete Entire Deployment ### → Request If the deployment is still running, the system will automatically stop it first, then delete it completely (including all containers and associated resources). ``` DELETE /api/v1/dev/deployment ``` ```json Request Body theme={null} JSON{ "deployment_uuid": "xxx" } ``` ### ← Response | Parameter | Type | Description | | - | - | - | | `code` | String | `Success` on success | | `msg` | String | Empty when successful | | `data` | null | No data returned | ```json Response (on success) theme={null} JSON{ "code": "Success", "msg": "", "data": null } ``` ```python Python theme={null} import requests headers = { "Authorization": "your_token_here", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment" body = {"deployment_uuid": "5be3045703152b9"} response = requests.delete(url, json=body, headers=headers) print(response.json()) ``` ## 7. List Container Events ### → Request ``` POST /api/v1/dev/deployment/container/event/list ``` Place the following parameters in the request body: | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_uuid` | String | Yes | Deployment UUID | | `deployment_container_uuid` | String | No | Specific container UUID (leave empty for all) | | `page_index` | Int | Yes | Page number (starting from 1) | | `page_size` | Int | Yes | Number of items per page | | `offset` | Int | No | Starting offset (used for polling new events) | ```json Request Body theme={null} { "deployment_uuid": "da497aea1eb8343", "deployment_container_uuid": "", "page_index": 1, "page_size": 10, "offset": 0 } ``` ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | Object | Container event data | Event Object Fields | Parameter | Type | Description | | - | - | - | | `deployment_container_uuid` | String | UUID of the container | | `status` | String | Container state (e.g., `creating`, `starting`, `running`, `shutting_down`, `shutdown`) | | `created_at` | String | Timestamp when the state change occurred | ```json Response (on success) theme={null} { "code": "Success", "data": { "list": [ { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "shutdown", "created_at": "2022-12-13T16:42:45+08:00" }, { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "shutting_down", "created_at": "2022-12-13T16:42:40+08:00" }, { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "running", "created_at": "2022-12-13T16:34:57+08:00" }, { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "oss_merged", "created_at": "2022-12-13T16:34:55+08:00" }, { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "starting", "created_at": "2022-12-13T16:34:55+08:00" }, { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "created", "created_at": "2022-12-13T16:34:54+08:00" }, { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "status": "creating", "created_at": "2022-12-13T16:34:47+08:00" } ], "page_index": 1, "page_size": 10, "offset": 0, "max_page": 1, }, "msg": "" } ``` ```python Python theme={null} import requests headers = { "Authorization": "your_token_here", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment/container/event/list" body = { "deployment_uuid": "da497aea1eb8343", "deployment_container_uuid": "", "page_index": 1, "page_size": 10, "offset": 0 } response = requests.post(url, json=body, headers=headers) print(response.json()) ``` ## 8. List Containers ### → Request Inside the container, you can get the current container's UUID via the environment variable: `AutoDLContainerUUID` ``` POST /api/v1/dev/deployment/container/list ``` Request Body Parameters | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_uuid` | String | Yes | Deployment UUID | | `container_uuid` | String | No | Filter by specific container UUID | | `date_from` / `date_to` | String | No | Filter by container creation time range | | `gpu_name` | String | No | Filter by GPU model | | `cpu_num_from/to` | Int | No | CPU core range | | `memory_size_from/to` | Int | No | Memory range (bytes) | | `price_from/to` | Float | No | Base price range (USD × 1000) | | `released` | Boolean | No | Include released containers? | | `status` | `List` | No | Filter by status: e.g., `["running"]` | | `page_index` | Int | Yes | Page number (default: 1) | | `page_size` | Int | Yes | Items per page (default: 10) | | `offset` | Int | No | Starting offset | ```json Request Body theme={null} { "deployment_uuid": "da497aea1eb8343", "page_index": 1, "page_size": 10 } ``` ### ← Response Response Fields | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data.list` | Array | List of container objects | Container Object | Field | Type | Description | | - | - | - | | `uuid` | String | Container UUID | | `version` | String | Container version (auto-generated or user-specified on deployment update) | | `data_center` | String | Region / data center code (e.g., `Singpore-A`) | | `deployment_uuid` | String | Parent deployment UUID | | `machine_id` | String | Physical host ID | | `status` | String | Current status (`running`, `stopped`, `starting`, etc.) | | `gpu_name` | String | GPU model (e.g., `RTX 5090`) | | `gpu_num` | Int | Number of GPUs allocated | | `cpu_num` | Int | Number of CPU cores | | `memory_size` | Int | Memory size in **bytes** | | `image_uuid` | String | Image UUID | | `price` | Float | Base price in **USD × 1000** (e.g., 1600 = \$1.60/hr) | | `info` | Object | Connection details (see below) | | `started_at` | String | Time when container started running | | `stopped_at` | String | Time when container stopped (null if running) | | `created_at` | String | Creation timestamp | | `updated_at` | String | Last update timestamp | `info` Object (Connection Details) | Field | Type | Description | | - | - | - | | `ssh_command` | String | Full SSH login command | | `root_password` | String | Root password for SSH | | `service_6006_port_url` | String | Public HTTPS URL for port 6006 | | `service_6008_port_url` | String | Public HTTP URL for port 6008 | | `service_url`, `proxy_host`, `custom_port` | — | **Deprecated** — use the two service URLs above | ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": { "list": [ { "uuid": "53a677bb3e281b8-f94411a60c-63c24009", "data_center": "Singpore-A", "deployment_uuid": "da497aea1eb8343", "status": "running", "gpu_name": "RTX 5090", "gpu_num": 1, "cpu_num": 16, "memory_size": 68719476736, "image_uuid": "image-xxxxxxxx", "price": 1600, "info": { "ssh_command": "ssh -p 22345 root@singpore-a.gpuhub.com", "root_password": "xxxxxxxxxx", "service_6006_port_url": "https://singpore-a.gpuhub.com:22346", "service_6008_port_url": "http://singpore-a.gpuhub.com:22348" }, "started_at": "2025-11-19T10:43:03+08:00", "created_at": "2025-11-19T10:42:50+08:00" } ], "page_index": 1, "page_size": 10, "max_page": 1 } } ``` ```python Python theme={null} import requests headers = { "Authorization": "your_token_here", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment/container/list" body = { "deployment_uuid": "da497aea1eb8343", "status": ["running"], "page_index": 1, "page_size": 10 } response = requests.post(url, json=body, headers=headers) print(response.json()) ``` ## 9. Stop a Container ### → Request ``` PUT /api/v1/dev/deployment/container/stop ``` Place the following parameters in the request body: | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_container_uuid` | String | Yes | UUID of the container to stop | | `decrease_one_replica_num` | Boolean | No | **ReplicaSet only**: if `true`, decreases the desired replica count by 1 after stopping (default: `false`) | | `no_cache` | Boolean | No | If `true`, prevents the stopped container from being cached for reuse (default: `false`) | | `cmd_before_shutdown` | String | No | Command to run before shutdown (5-second timeout; force-kills on timeout). Overrides any `cmd_before_shutdown` set during deployment creation (very rare chance both run) | ```json Request Body theme={null} { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-a394fb30", "decrease_one_replica_num": false, "no_cache": false, "cmd_before_shutdown": "sleep 5" } ``` ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | null | No data returned | ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": null } ``` ```python Python theme={null} import requests headers = { "Authorization": "your token", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/deployment/container/event/stop" body = { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-a394fb30", "decrease_one_replica_num": false, "no_cache": false, "cmd_before_shutdown": "sleep 5" } response = requests.put(url, json=body, headers=headers) print(response.content.decode()) ``` ## 10. Host Blacklist ### → Request To avoid bad machines: if a container experiences unknown issues (e.g., slow startup, crashes), you can blacklist its host to prevent future scheduling on that machine. ``` POST /api/v1/dev/deployment/blacklist ``` | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_container_uuid` | String | Yes | UUID of the problematic container | | `expire_in_minutes` | Int | No | Blacklist duration in minutes. Default: **1440** (24 hours). Max: **43200** (30 days) | | `comment` | String | No | Optional note (e.g., "Slow boot") | ```json Request Body theme={null} { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "expire_in_minutes": 1440, "comment": "Slow startup — avoid this host" } ``` ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | null | No data returned | ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": null } ``` ```python Python theme={null} import requests headers = {"Authorization": "your token", "Content-Type": "application/json"} url = "https://api.gpuhub.com/api/v1/dev/deployment/blacklist" body = { "deployment_container_uuid": "da497aea1eb8343-f94411a60c-1502e6e2", "expire_in_minutes": 1440, "comment": "Slow startup — avoid this host" } response = requests.post(url, json=body, headers=headers) print(response.json()) ``` ## 11. Get Active Blacklist ### → Request ``` GET /api/v1/dev/deployment/blacklist ``` No body required. ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | List | List of active blacklist entries | Blacklist Entry Object | Field | Type | Description | | - | - | - | | `created_at` | String | Timestamp when the blacklist was first created | | `updated_at` | String | Timestamp of the last update (updates when expiry time is extended) | | `data_center` | String | Region / data center code (e.g., `Singpore-A`) | | `expired_time` | String | Timestamp when the blacklist entry will automatically expire | | `machine_id` | String | Physical host ID that is blacklisted | | `msg` | String | Optional comment provided when creating the blacklist | ```json Success Response theme={null} { "code": "Success", "msg": "", "data": [ { "created_at": "2025-03-25T17:42:55+08:00", "updated_at": "2025-03-25T17:48:11+08:00", "data_center": "Singpore-A", "machine_id": "24fb4ca36a", "expired_time": "2025-03-26T17:48:11+08:00", "msg": "Slow startup — avoid this host" } ] } ``` ```python Python theme={null} import requests headers = {"Authorization": "your token"} url = "https://api.gpuhub.com/api/v1/dev/deployment/blacklist" response = requests.get(url, headers=headers) print(response.json()) ``` ## 12. Real-time GPU Stock by Region ### → Request ``` POST /api/v1/dev/machine/region/gpu_stock ``` Use this endpoint before creating deployments to check real-time availability and avoid scheduling failures. Stock is calculated assuming 1 GPU per container. Even if a host has 2 idle GPUs, they may be on different machines — a container requiring 2 GPUs might still fail to schedule. Request Body Parameters | Parameter | Type | Required | Description | | - | - | - | - | | `region_sign` | String | Yes | Region code (see Appendix) | | `cuda_v_from` | Int | No | Minimum supported CUDA version (e.g., `118` = CUDA 11.8) | | `cuda_v_to` | Int | No | Maximum supported CUDA version | | `gpu_name_set` | `List` | No | Filter by specific GPU models | | `memory_size_from` | Int | No | Minimum memory size in GB | | `memory_size_to` | Int | No | Maximum memory size in GB | | `cpu_num_from` | Int | No | Minimum CPU cores | | `cpu_num_to` | Int | No | Maximum CPU cores | | `price_from` | Int | No | Minimum price (USD \* 1000, e.g., \$0.10/hr → `100`) | | `price_to` | Int | No | Maximum price (USD \* 1000) | ```json Request Body theme={null} { "region_sign": "Singpore-A", "cuda_v_from": 118, "cuda_v_to": 128 } ``` ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | List | List of GPU inventory objects | GPU Inventory Object | Field | Type | Description | | - | - | - | | `{GPU_MODEL}` | Object | Key is the GPU model name | | `idle_gpu_num` | Int | Number of currently idle GPUs | | `total_gpu_num` | Int | Total number of GPUs | ```json Response (on success) theme={null} { "code": "Success", "msg": "", "data": [ { "RTX 5090": { "idle_gpu_num": 312, "total_gpu_num": 2850 } }, { "RTX Pro 6000": { "idle_gpu_num": 48, "total_gpu_num": 640 } } ] } ``` ```python Python theme={null} import requests headers = { "Authorization": "your_token_here", "Content-Type": "application/json" } url = "https://api.gpuhub.com/api/v1/dev/machine/region/gpu_stock" body = { "region_sign": "Singpore-A", "cuda_v_from": 118, "cuda_v_to": 138 } response = requests.post(url, json=body, headers=headers) print(response.json()) ``` ## 13. Check Duration Package Balance ### → Request ``` GET /api/v1/dev/deployment/ddp/overview ``` Request Parameters (Query String) | Parameter | Type | Required | Description | | - | - | - | - | | `deployment_uuid` | String | Yes | UUID of the deployment | ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | `code` | String | Response status. `Success` on success | | `msg` | String | Error message. Empty when successful | | `data` | List | List of prepaid package objects | Prepaid Package Object | Field | Type | Description | | - | - | - | | `gpu_type` | String | GPU model (e.g., `RTX 5090`) | | `total` | Int | Total remaining seconds across all **unused** prepaid packages (seconds) | | `balance` | Int | Currently remaining seconds from **unused** packages (seconds) | | `dc_list` | String | Regions covered by the package (comma-separated if multiple, e.g., `singpore-a,singapore-b`) | ### ← Response ```json Response (on success) theme={null} { "code": "Success", "data": [ { "gpu_type": "RTX 5090", "total": 86400, "balance": 83829, "dc_list": "Singpore-A,Singapore-B" } ], "msg": "" } ``` ```python Python theme={null} import requests headers = {"Authorization": "your_token_here"} url = "https://api.gpuhub.com/api/v1/dev/deployment/ddp/overview" params = {"deployment_uuid": "your_deployment_uuid_here"} response = requests.get(url, params=params, headers=headers) print(response.json()) ``` ## 14. Appendix ### region\_sign & dc\_list Values for dc\_list (preferred) or the deprecated region\_sign parameter when creating a deployment, After a container starts, the current region is also available inside the container via the environment variable. | Region Name | `dc_list` Value | Old `region_sign` | | - | - | - | | Singapore-B | `Singpore-A` | `Singpore-A` | | Singapore-A | `Singapore-B` | `Singapore-B` | ### Public Image UUID | Framework | Framework Version | Image UUID | Description | | - | - | - | - | | PyTorch | 2.8.0 (Blackwell) | `base-image-ec1e9vdbd3` | CUDA 12.8 · Ubuntu 22.04 | | PyTorch | 2.7.0 | `base-image-d13e3vu5d3` | CUDA 12.8 · Ubuntu 22.04 | | PyTorch | 2.5.1 | `base-image-b2343du52k` | CUDA 12.4 · Ubuntu 22.04 | | PyTorch | 2.5.1 | `base-image-c1333ve5d3` | CUDA 8.1.rc1 · Ubuntu 22.04 | | PyTorch | 2.3.0 | `base-image-321232d5d4` | CUDA 12.1 · Ubuntu 22.04 | | PyTorch | 2.1.2 | `base-image-lbdbb183fk` | CUDA 11.8 · Ubuntu 22.04 | | PyTorch | 2.1.0 | `base-image-323d32u534` | CUDA 12.1 · Ubuntu 22.04 | | PyTorch | 2.1.0 | `base-image-pi743du52k` | CUDA 8.0 · Ubuntu 22.04 | | PyTorch | 2.0.0 | `base-image-l2t43iu6uk` | CUDA 11.8 · Ubuntu 20.04 | | PyTorch | 1.11.0 | `base-image-l374uiucui` | CUDA 11.3 · Ubuntu 20.04 | | PyTorch | 1.10.0 | `base-image-tbk3g58lhs` | CUDA 11.3 · Ubuntu 20.04 | | PyTorch | 1.9.0 | `base-image-12be412037` | CUDA 11.1 · Ubuntu 18.04 | | PyTorch | 1.8.1 | `base-image-db83412037` | CUDA 11.1 · Ubuntu 18.04 | | PyTorch | 1.7.0 | `base-image-db8346e037` | CUDA 11 · Ubuntu 18.04 | | PyTorch | 1.6.0 | `base-image-ldnbxc4by8` | CUDA 10.1 · Ubuntu 18.04 | | PyTorch | 1.5.1 | `base-image-qyil80d3s4` | CUDA 10.1 · Ubuntu 18.04 | | PyTorch | 1.1.0 | `base-image-0x7zgbw1ji` | CUDA 10 · Ubuntu 18.04 | | TensorFlow | 2.9.0 | `base-image-uxeklgirir` | CUDA 11.2 · Ubuntu 20.04 | | TensorFlow | 2.5.0 | `base-image-0gxqmciyth` | CUDA 11.2 · Ubuntu 18.04 | | TensorFlow | 1.15.5 | `base-image-4bpg0tt88l` | CUDA 11.4 · Ubuntu 20.04 | | Miniconda | — | `base-image-8hkyyugih5` | CUDA 11.8 · Ubuntu 22.04 | | Miniconda | — | `base-image-m26c71lgul` | CUDA 11.8 · Ubuntu 20.04 | | Miniconda | — | `base-image-mbr2n4urrc` | CUDA 11.6 · Ubuntu 20.04 | | Miniconda | — | `base-image-zsd8dwuwus` | CUDA 11.3(cudagl) · Ubuntu 20.04 | | Miniconda | — | `base-image-7bn8iqhkb5` | CUDA 11.3 · Ubuntu 18.04 | | Miniconda | — | `base-image-h041hn36yt` | CUDA 11.1 · Ubuntu 18.04 | | Miniconda | — | `base-image-hek323ev8b` | CUDA 10.1 · Ubuntu 18.04 | | Miniconda | — | `base-image-qkkhitpik5` | CUDA 10.2 · Ubuntu 18.04 | | Miniconda | — | `base-image-1e5uf433g1` | CUDA 10 · Ubuntu 18.04 | | Miniconda | — | `base-image-k0vep6kyq8` | CUDA 9 · Ubuntu 16.04 | | Miniconda | — | `base-image-b23jugu52k` | CUDA 8.0 · Ubuntu 22.04 | | TensorRT | 8.6.1 | `base-image-l2193iu12k` | CUDA 11.8 · Ubuntu 20.04 | | TensorRT | 8.5.1 | `base-image-l2843iu23k` | CUDA 11.8 · Ubuntu 20.04 | More images are added regularly: contact support for the latest list or request a custom base image. ### CUDA Version values | CUDA Version | Value to use in `cuda_v_from` / `cuda_v_to` | | - | - | | 11.8 | `118` | | 12.0 | `120` | | 12.1 | `121` | | 12.2 | `122` | If your framework needs CUDA 11.5 (or any unlisted version), choose the lowest available version ≥ your requirement (e.g., 11.8 → `118`). Higher drivers are backward-compatible, but picking a version that's too high reduces available GPUs. Always select the smallest compatible value to maximize scheduling success. ### Container Environment Variables | Variable Name | ODescription | | - | - | | AutoDLContainerUUID | Unique ID of the current container | | AutoDLDeploymentUUID | UUID of the parent deployment | | AutoDLDataCenter | Current region / data center code | # Obtain Balances Source: https://docs.gpuhub.com/api-reference/api-obtain-balances Authentication to the GPUhub API to obtain account current balances and other information ## Obtaining Balances ### → Request ``` POST /api/v1/dev/wallet/balance ``` Request Parameters `None` ### ← Response **Response Parameters** | Parameter | Data Type | Notes | | - | - | - | | code | String | Response code, "Success" for success | | msg | String | Error message, empty for success | | data | Object | Response data object | **Response Object Parameters** | Parameter | Data Type | Notes | | - | - | - | | assets | Int | Current balance, in cent (divide by 1000 to get dollor) | | accumulate | Int | Cumulative consumption, in cent (divide by 1000 to get dollor) | | voucher\_balance | Int | Current voucher balance, in cent (divide by 1000 to get dollor) | Example ```javascript javascript theme={null} { "code": "Success", "data": { "assets": 1000, "accumulate": 1000, "voucher_balance": 1000 }, "msg": "" } ``` Python Example ```python python theme={null} import requests headers = { "Authorization": "Your token" } url = "https://api.gpuhub.com/api/v1/dev/wallet/balance" response = requests.post(url, headers=headers) print(response.content.decode()) ``` # Switch Dedicated NFS / File Storage Source: https://docs.gpuhub.com/api-reference/api-switch-nfs-fs To switch between Dedicated NFS storage and standard file storage for a specified data center. ## Switch Dedicated NFS / File Storage ### → Request ``` POST /api/v1/dev/exclusive_nfs/mount ``` Request Parameters | Parameter | Type | Description | | - | - | - | | data\_center | String | Target region code. Refer to the appendix of the Elastic Deployment API documentation for available values. | | mountable | Int | Set to `1` to mount **Dedicated NFS** (this will disable normal file storage). Set to `-1` to disable Dedicated NFS and switch back to **standard file storage**. | ### ← Response Response Parameters | Parameter | Type | Description | | - | - | - | | code | String | Response code. Returns `Success` on success. | | msg | String | Error message. Empty when the request is successful. | Example Response ```json theme={null} { "code": "Success", "msg": "" } ``` Python Example ```python theme={null} import requests headers = { "Authorization": "YOUR_TOKEN" } body = { "data_center": "westDC2", "mountable": 1 } url = "https://api.gpuhub.com/api/v1/dev/exclusive_nfs/mount" response = requests.post(url, json=body, headers=headers) print(response.content.decode()) ``` # Computational Precision Source: https://docs.gpuhub.com/best-practices/computational-precision If the computational precision error is significant, it may be due to the introduction of the TF32 numerical type by NVIDIA's Ampere architecture GPUs, and frameworks such as Torch may automatically enable TF32 computations. > [!NOTE] > > TF32 offers FP16 precision and FP32 range, boosting performance but possibly reducing accuracy. For this issue, you can refer to the [official Torch documentation](https://pytorch.org/docs/stable/notes/cuda.html#tf32-on-ampere). ## Before Generally, TF32 is sufficient, but significant errors may occur if there are unusually large weight values (which is rare). Here's a simple comparison of results: code: ``` import torch A = torch.tensor([[113.2017, 7.4502, 39.3118], [-99.4285, 13.2169, 85.9321], [194.0693, -4282.2979, 58.0138]]).float().cuda() B = torch.tensor([[0.8673, -0.4966, 0.0337], [0.0377, -0.0019, -0.9993], [0.4963, 0.8680, 0.0171]]).float().cuda() gpu = A @ B cpu = A.cpu() @ B.cpu() print('gpu:\n', gpu) print('cpu:\n', cpu) print('gpu-cpu:\n', gpu.cpu() - cpu) print("-" * 10) A = torch.rand(3, 3).float().cuda() B = torch.rand(3, 3).float().cuda() print("A:\n", A) print("B:\n", B) gpu = A @ B cpu = A.cpu() @ B.cpu() print('gpu:\n', gpu) print('cpu:\n', cpu) print('gpu-cpu:\n', gpu.cpu() - cpu) ``` output: ``` gpu: tensor([[ 1.1795e+02, -2.2091e+01, -2.9597e+00], [-4.3079e+01, 1.2396e+02, -1.5093e+01], [ 3.5670e+01, -3.7907e+01, 4.2894e+03]], device='cuda:0') cpu: tensor([[ 1.1797e+02, -2.2107e+01, -2.9579e+00], [-4.3088e+01, 1.2394e+02, -1.5089e+01], [ 3.5666e+01, -3.7882e+01, 4.2868e+03]]) gpu-cpu: tensor([[-2.3331e-02, 1.6153e-02, -1.8351e-03], [ 9.2430e-03, 2.1469e-02, -3.5658e-03], [ 3.8834e-03, -2.4605e-02, 2.6079e+00]]) ---------- A: tensor([[0.2938, 0.5557, 0.5823], [0.7572, 0.8567, 0.8239], [0.1630, 0.3278, 0.0526]], device='cuda:0') B: tensor([[0.6398, 0.1599, 0.5362], [0.6011, 0.3908, 0.5424], [0.5615, 0.7290, 0.6213]], device='cuda:0') gpu: tensor([[0.8490, 0.6888, 0.8207], [1.4620, 1.0566, 1.3825], [0.3308, 0.1926, 0.2979]], device='cuda:0') cpu: tensor([[0.8489, 0.6886, 0.8207], [1.4620, 1.0564, 1.3825], [0.3308, 0.1925, 0.2979]]) gpu-cpu: tensor([[ 4.5955e-05, 2.0498e-04, -6.3181e-06], [ 8.4162e-05, 1.1504e-04, -3.2902e-05], [ 1.8775e-06, 6.3717e-05, 2.8968e-05]]) ``` ## Disable TF32 computations The first set of calculations shows a large difference between GPU and CPU results due to the large numbers in matrix A. The second set with random matrices has smaller discrepancies. To avoid such errors, you can disable TF32 computations by setting: ```python python theme={null} torch.backends.cuda.matmul.allow_tf32 = False # Disable TF32 for matrix multiplication torch.backends.cudnn.allow_tf32 = False # Disable TF32 for convolutions ``` ## After code: ``` import torch torch.backends.cuda.matmul.allow_tf32 = False torch.backends.cudnn.allow_tf32 = False A = torch.tensor([[113.2017, 7.4502, 39.3118], [-99.4285, 13.2169, 85.9321], [194.0693, -4282.2979, 58.0138]]).float().cuda() B = torch.tensor([[0.8673, -0.4966, 0.0337], [0.0377, -0.0019, -0.9993], [0.4963, 0.8680, 0.0171]]).float().cuda() gpu = A @ B cpu = A.cpu() @ B.cpu() print('gpu:\n', gpu) print('cpu:\n', cpu) print('gpu-cpu:\n', gpu.cpu() - cpu) print("-" * 10) A = torch.rand(3, 3).float().cuda() B = torch.rand(3, 3).float().cuda() print("A:\n", A) print("B:\n", B) gpu = A @ B cpu = A.cpu() @ B.cpu() print('gpu:\n', gpu) print('cpu:\n', cpu) print('gpu-cpu:\n', gpu.cpu() - cpu) ``` output: ``` gpu: tensor([[ 1.1797e+02, -2.2107e+01, -2.9579e+00], [-4.3088e+01, 1.2394e+02, -1.5089e+01], [ 3.5666e+01, -3.7882e+01, 4.2868e+03]], device='cuda:0') cpu: tensor([[ 1.1797e+02, -2.2107e+01, -2.9579e+00], [-4.3088e+01, 1.2394e+02, -1.5089e+01], [ 3.5666e+01, -3.7882e+01, 4.2868e+03]]) gpu-cpu: tensor([[0.0000e+00, 0.0000e+00, 2.3842e-07], [0.0000e+00, 0.0000e+00, 0.0000e+00], [7.6294e-06, 0.0000e+00, 0.0000e+00]]) ---------- A: tensor([[0.3775, 0.7031, 0.2857], [0.7453, 0.2000, 0.9838], [0.3098, 0.7035, 0.4328]], device='cuda:0') B: tensor([[0.6860, 0.6289, 0.9266], [0.6632, 0.1984, 0.4418], [0.4027, 0.1074, 0.3741]], device='cuda:0') gpu: tensor([[0.8404, 0.4076, 0.7673], [1.0401, 0.6141, 1.1470], [0.8534, 0.3809, 0.7598]], device='cuda:0') cpu: tensor([[0.8404, 0.4076, 0.7673], [1.0401, 0.6141, 1.1470], [0.8534, 0.3809, 0.7598]]) gpu-cpu: tensor([[ 0.0000e+00, 0.0000e+00, 0.0000e+00], [-1.1921e-07, 0.0000e+00, 0.0000e+00], [ 5.9605e-08, -2.9802e-08, 0.0000e+00]]) ``` # Cost-Saving Tips Source: https://docs.gpuhub.com/best-practices/cost-saving Tips for saving money on GPUhub by using no-GPU mode, adjusting GPU configurations, and automating shutdown etc. ## Scenario 1 For tasks that don't require a GPU, such as coding, debugging, or data transfer, you can shut down and restart in "no-GPU mode." This mode uses 0.5 CPU cores, 2GB memory, and no GPU, costing \$0.1/hour. Data remains unaffected, and you can switch back to normal mode later. > [!WARNING] > > No-GPU mode releases the GPU and sets it to an idle state. If the GPU is rented by other users during normal startup, there may be insufficient idle GPUs available. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/cost-saving-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=a15112c680f91a2e69348f7c6e98b3d6) ## Scenario 2 Start with one GPU for debugging and validation, then scale up to multiple GPUs for parallel training to save costs. Refer to [Scale Configuration](/container-instance/scale-configuration) for details. ## Scenario 3 If you're unsure how long your code will run and want to shut down the machine immediately after completion, you can use the `shutdown` command (preferably with the full path: `/usr/bin/shutdown`). > [!NOTE] > > Save your program's logs, as they will no longer be visible after automatic shutdown. Example Commands: ```bash bash theme={null} # If your original command is: python train.py # You can append the shutdown command: python train.py; /usr/bin/shutdown # Using `;` ensures shutdown runs regardless of the previous command’s success. python train.py && /usr/bin/shutdown # Using `&&` ensures shutdown runs only if the previous command succeeds. Choose based on your needs. ``` Alternatively, you can call `shutdown` from within your Python code: ```python python theme={null} import os if __name__ == "__main__": # Your code here os.system("/usr/bin/shutdown") ``` # Exposing Multiple Services Source: https://docs.gpuhub.com/best-practices/exposing-multiple-services Currently, the custom services provided by GPUhub only support exposing a single port. If you need to expose multiple services (HTTP services) from different containers, you can use a proxy to implement routing and forwarding. For example, you can use Nginx for forwarding. Here, we provide a more lightweight approach. ## Scope of the Lightweight Proxy The lightweight proxy solution (route\_path-based forwarding) is primarily designed for backend API and HTTP request forwarding. It does not guarantee full compatibility with **complex Web UI applications, such as ComfyUI, Gradio, or other SPA-based interfaces**. These applications typically rely on static asset routing, frontend path resolution, and WebSocket connections, which may not function correctly under simple path-based forwarding. If you need to expose a complete Web UI application, we recommend deploying a standard reverse proxy (e.g., Nginx) inside the container to handle routing and asset forwarding properly. ## Route-Based Forwarding with proxy\_in\_instance Assuming you have two services running inside your container, listening on ports `2000` and `3000` respectively, here is an example using Flask: ```python python theme={null} # Simulate a service listening on port 2000 from flask import Flask app = Flask(__name__) @app.route('/v1/hello') def hello(): return 'I`m port 2000' if __name__ == '__main__': app.run(port=2000) # Simulate a service listening on port 3000 from flask import Flask app = Flask(__name__) @app.route('/v2/hello') def hello(): return 'I`m port 3000' if __name__ == '__main__': app.run(port=3000) ``` Below, we will start a routing and forwarding service on port `6006`. If the route matches `/v1/*`, it will forward the request to the service listening on port `2000`. If the route matches `/v2/*`, it will forward the request to the service listening on port `3000`. D ownload the proxy service program: First, download the proxy service program using the following command: ```bash theme={null} wget https://autodl-public.ks3-cn-beijing.ksyuncs.com/tool/api-proxy/proxy_in_instance ``` Create the `config.yaml` file: In the same directory as the downloaded proxy service program, create a file named config.yaml with the following content: ```yaml yaml theme={null} proxies: - host_and_port: http://127.0.0.1:2000 # Address of the service to proxy route_path: /v1/* # Route path to forward to this address - host_and_port: http://127.0.0.1:3000 # Multiple entries can be set to forward to different hosts route_path: /v2/* ``` Start the proxy service: ```bash bash theme={null} # If the proxy program is not downloaded, download it using the command above. wget https://autodl-public.ks3-cn-beijing.ksyuncs.com/tool/api-proxy/proxy_in_instance ``` ```yaml yaml theme={null} # If the proxy program does not have executable permissions, add the permissions chmod +x proxy_in_instance ``` ```bash bash theme={null} # Start the proxy service: ./proxy_in_instance ``` # Filezilla Source: https://docs.gpuhub.com/best-practices/filezilla If you want to upload and download files/folders from the instance more conveniently, you can use FileZilla: it's free and available on all platforms (Mac, Linux, Windows). ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-filezilla.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=ab92691b13e569b437d571283b85f7e6) ## Install FileZilla > **[Filezilla Official Download](https://filezilla-project.org/)** > > []() Besides, the simplest way to install FileZilla on Linux is: ```bash bash theme={null} sudo apt install filezilla ``` ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-filezilla-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=69a475d1a4b5479a0e5bf1a649cba965) ## Connect to the Instance Copy the SSH command for your instance, for example: `ssh -p 50762 root@region-2.gpuhub.com`. In the command, the meanings of the parameters are: * Username: `root` * Host: `region-2.gpuhub.com` * Port Number: `50762` Open the following window from \[File] - \[Site Manager]. > [!NOTE] > > You need to select the SFTP protocol. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-filezilla-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=5a67d3d140498356da02cf912b0e1c61) You can now easily upload and download files/folders by dragging and dropping. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-filezilla-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=d9bbe20aca1325768674e4c90552d8b4) # Gromacs Source: https://docs.gpuhub.com/best-practices/gromacs Gromacs is a molecular dynamics package used for researching biological molecular systems. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-gromacs.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=dd3f1802b279a584e52d168591834908) When creating an instance on GPUhuband selecting the image, use the Gromacs image to create an instance that comes with the Gromacs software package pre-installed. The pre-installed Gromacs has been compiled with CUDA, so it will use GPU acceleration for computations by default. Here is a test case for Gromacs ([source of the case](https://confluence.csuc.cat/display/HPCKB/How+to+run+a+Gromacs+simulation+of+a+protein)): ## Step 1: Preparation Create a directory named `test` and navigate into it. ```bash bash theme={null} mkdir test && cd test ``` ## Step 2: Generate Input Files Run this command separately; otherwise, it may hang. When prompted, select 14: GROMOS96 54a7 and 1: SPC. ```bash bash theme={null} gmx pdb2gmx -f 2n6m.pdb -o esculentin.gro -p esculentin.top -ignh ``` ## Step 3: Set Simulation Parameters ```bash bash theme={null} gmx editconf -f esculentin.gro -o esculenbox.gro -box 5 5 5 gmx solvate -cp esculenbox.gro -o solvated.gro -p esculentin.top ``` ## Step 4: Configuration Create a configuration file `options.mdp` with the following content: ```bash bash theme={null} cat > options.mdp << EOF integrator = md nsteps = 50000000 nstxout = 50000 coulombtype = PME fourierspacing = 0.15 tcoupl = v-rescale tau-t = 0.2 0.2 ref-t = 298.15 298.15 tc-grps = Protein Non-protein pcoupl = berendsen compressibility = 4.5e-5 tau-p = 0.2 ref-p = 1.0 EOF gmx grompp -f options.mdp -c solvated.gro -p esculentin.top -o esculentin.tpr -maxwarn 100 ``` ## Step 5: Run Simulation ```bash bash theme={null} gmx mdrun -s esculentin.tpr ``` ## Gromacs Installation Script: ```bash bash theme={null} wget https://ftp.gromacs.org/gromacs/gromacs-2022.2.tar.gz \ && tar xfz gromacs-2022.2.tar.gz \ && cd gromacs-2022.2 \ && mkdir build \ && cd build \ && /root/miniconda3/bin/cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \ && make -j8 && make check && make install \ && cd ../../ && rm -rf gromacs-* \ && echo "PATH=/usr/local/gromacs/bin/:\$PATH" >> /etc/profile ``` # HuggingFace Source: https://docs.gpuhub.com/best-practices/huggingface The platform where the machine learning community collaborates on models, datasets, and applications. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-huggingface.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=495f5e5b7fbaf9c561ab1e1f414d5b7c) ## Common Issues The models downloaded from HuggingFace take up a lot of system disk space, causing the system disk space to run out. By default, HuggingFace caches models in the /root/.cache directory. You can save the model cache to the data disk by following these methods: Execute in the terminal: ```bash bash theme={null} export HF_HOME=/root/gpuhub-tmp/cache/ ``` Or execute in Python code: ```Python python theme={null} import os os.environ['HF_HOME'] = '/root/gpuhub-tmp/cache/' ``` # Linux Basics Source: https://docs.gpuhub.com/best-practices/linux-basics The system of instances rented on GPUhub defaults to the Linux Ubuntu distribution, so being familiar with basic Linux commands is very necessary for training models. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-linux.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=6fc22b28237588593bd6ca4ac211bcb8) Below is an introduction to the commonly used essential commands: ## List Files/Folders Command: `ls` (list) ```bash bash theme={null} user@host:/tmp/test_dir$ ls # List files and directories in the current directory a.txt b user@host:/tmp/test_dir$ ls -l # List detailed information about files and directories: permissions, Owner, Group, and creation/update time total 4 -rw-rw-r-- 1 root root 0 Nov 9 10:50 a.txt drwxrwxr-x 2 root root 4096 Nov 9 10:50 b ``` ## Create/Change Paths Create command: `mkdir` (make directory) Change command: `cd` (change working directory) ```bash bash theme={null} user@host:/tmp$ mkdir test_dir # Create a new directory named test_dir user@host:/tmp$ cd test_dir/ # Enter the test_dir directory user@host:/tmp/test_dir$ ``` Two special directories: `..` and `.` or written as `../` and `./`, where `..` represents the parent directory and `./` represents the current directory. ```bash bash theme={null} user@host:/tmp/test_dir$ cd ../test_dir/ # Go to the test_dir directory which is in the parent directory user@host:/tmp$ ``` ## View Current Path Command: `pwd` (print working directory) ```bash bash theme={null} user@host:~$ pwd /root/ user@host:~$ ``` ## Rename or Move Files/Folders Command: `mv` (move) ```plaintext plaintext theme={null} user@host:/tmp# mv test_dir/ test_directory # Rename the directory test_dir to test_directory; this also applies to renaming files user@host:/tmp# cd test_directory/ user@host:/tmp/test_directory# ``` ```plaintext plaintext theme={null} user@host:/tmp/test_directory# mkdir a b # Create two directories named a and b user@host:/tmp/test_directory# ls a b user@host:/tmp/test_directory# mv a b/ # Move a into the directory b. If directory b does not exist, this command would rename a to b user@host:/tmp/test_directory# tree . └── b └── a ``` ## Copy Files/Folders Command: `cp` (copy) Option: `-r` (the -r stands for recursive) ```bash bash theme={null} user@host:/tmp/test_directory$ mkdir a b # Create two directories named a and b user@host:/tmp/test_directory$ ls a b user@host:/tmp/test_directory$ cp -r a b # Copy directory a into directory b, with -r indicating recursive copy user@host:/tmp/test_directory$ tree . ├── a └── b └── a ``` ## Delete Files/Folders Command: `rm` (remove) Option: `-rf` (the -r stands for recursive, and -f stands for force) ```bash bash theme={null} user@host:/tmp/test_directory$ ls a.txt folder user@host:/tmp/test_directory$ rm -rf folder user@host:/tmp/test_directory$ rm -rf folder/* # The asterisk (*) is a wildcard, representing all files and folders within the folder ``` ## Set Environment Variables Command: `export` For setting environment variables, two common ones are PATH and LD\_LIBRARY\_PATH. Here's how you can configure them: 1. PATH If you have installed commands that you want to use directly, you can add them to the PATH environment variable. For instance, if you have Python installed in a non-standard location, you might need to add its path to PATH to use it without specifying the full path. You can do this with the following command: ```bash bash theme={null} export PATH=/x/x/x/miniconda3/bin:$PATH ``` This command adds the specified directory to the PATH variable, which is used by the shell to locate executable files when you type commands。The `$PATH` represents the current value of the PATH variable, and you should preserve it so that it doesn't affect the use of other commands. When you type a command like python, the shell will search for the executable in the directories listed in the PATH variable, using the first one it finds。The order of the paths before and after the colon (`:`) is important。 2. LD\_LIBRARY\_PATH Similar to PATH, LD\_LIBRARY\_PATH is used to set the search path for dynamic link libraries. After installing CUDA, for example, you might need to set it like this: ```bash bash theme={null} export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH ``` You can verify if the settings are successful by using the command `env | grep PATH`. Remember, the environment variables set with `export` are only valid in the current terminal session. To make them effective globally, write the `export` commands into the file `~/.bashrc`, and then execute `source ~/.bashrc` to make them take effect, or simply open a new terminal. ## Edit Text Files Command: `vim` Advanced usage of `vim` can be quite complex. Please refer to other documents for learning. ## Compress and Decompress Commands: `zip`, `unzip`, `tar` * `zip` and `unzip` are specifically for compressing and decompressing `.zip` archives. * `tar` is another more versatile compression and decompression tool available in Linux. Using zip and unzip: ```bash bash theme={null} #If you don't have zip installed, you can install it using: apt-get update && apt-get install -y zip #To compress a directory into a .zip file: user@host:/tmp$ zip -r dir.zip test_directory/ # Compress the test_directory into a file named dir.zip #To decompress a .zip file: user@host:/tmp$ unzip dir.zip # Decompress the dir.zip file ``` Using tar: ```bash bash theme={null} #The tar command is used for archiving and compressing files. The parameters c stands for create (compress), x for extract (decompress), and z for gzip compression/decompression. #To compress a directory into a .tar.gz file: user@host:/tmp$ tar czf dir.tar.gz test_directory/ # Compress the test_directory into a file named dir.tar.gz #To decompress a .tar.gz file: user@host:/tmp$ tar xzf dir.tar.gz # Decompress the dir.tar.gz file tar can also be used to compress and decompress other formats of archives, such as bz2. ``` ```bash bash theme={null} #To compress a directory into a .tar.bz2 file: user@host:/tmp$ tar cjf dir.tar.bz2 test_directory/ # Compress the test_directory into a file named dir.tar.bz2 #To decompress a .tar.bz2 file: user@host:/tmp$ tar xjf dir.tar.bz2 # Decompress the dir.tar.bz2 file ``` ## View GPU Information Command: `nvidia-smi` ``` user@host:/tmp/test_directory# nvidia-smi Mon Nov 8 11:55:26 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.82 Driver Version: 440.82 CUDA Version: 10.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 TITAN X (Pascal) Off | 00000000:01:00.0 On | N/A | | 31% 57C P0 66W / 250W | 408MiB / 12194MiB | 2% Default | +-------------------------------+----------------------+----------------------+ | 1 TITAN X (Pascal) Off | 00000000:04:00.0 Off | N/A | | 93% 27C P8 11W / 250W | 2MiB / 12196MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1450 G /usr/lib/xorg/Xorg 32MiB | | 0 2804 G /usr/lib/xorg/Xorg 351MiB | +-----------------------------------------------------------------------------+ ``` ``` Memory Usage # Memory Utilization 408MiB / 12194MiB # The former 408MiB represents the used GPU memory, while the latter 12194MiB represents the total GPU memory. GPU Utilization # GPU Utilization Rate 2% # Utilization percentage ``` If you need to continuously display GPU usage information, you can use `nvidia-smi -l 1` to output the information every 1 second. Alternatively, you can use `watch -n 1 nvidia-smi` to achieve the same effect. ## View/Kill Processes View Process Command: `ps` Kill Process Command: `kill` ```bash bash theme={null} root@container-5e3e11aeb4-948a17b1:~# ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 14:04 ? 00:00:00 bash /init/boot/boot.sh root 58 48 8 14:04 ? 00:00:03 /root/miniconda3/bin/python /root/miniconda3/bin/jupyter-lab --allow-root root 60 48 0 14:04 ? 00:00:00 /usr/sbin/sshd -D root 61 48 10 14:04 ? 00:00:04 /root/miniconda3/bin/python /root/miniconda3/bin/tensorboard --host 0.0.0.0 --port 6006 --logdir /root/tf-logs root 146 61 0 14:04 ? 00:00:00 /root/miniconda3/lib/python3.8/site-packages/tensorboard_data_server/bin/server --logdir=/root/tf-logs root 402 338 99 14:05 pts/0 00:00:06 python tensorflow2.x-test.py ``` From the output of the `ps` command, you can identify the process you want to terminate based on the command name. For example, if the process ID (PID) for the last `python tensorflow2.x-test.py` command executed is 402, you can terminate it with the following command: ```bash bash theme={null} root@container-5e3e11aeb4-948a17b1:~# kill -9 402 root@container-5e3e11aeb4-948a17b1:~# ``` The `-9` option forces the process to stop immediately. After executing the `kill` command, you can use `ps -ef` again to confirm whether the process has been terminated. ## View Process CPU and Memory Usage Command: `top` Alternatively, you can use the instance monitoring feature provided by the platform for a more convenient view. ``` Tasks: 11 total, 2 running, 9 sleeping, 0 stopped, 0 zombie %Cpu(s): 2.3 us, 1.3 sy, 0.0 ni, 96.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 52801571+total, 45453059+free, 7807904 used, 65677196 buff/cache KiB Swap: 2074620 total, 2074620 free, 0 used. 51678192+avail Mem PID user@host PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2316 root 20 0 21.846g 1.796g 244664 R 101.4 0.4 0:05.56 python 58 root 20 0 372352 84804 15540 S 1.4 0.0 0:05.40 jupyter-lab 59 root 20 0 713796 11288 7668 S 1.4 0.0 0:01.31 proxy 2395 root 20 0 45920 3940 3444 R 1.4 0.0 0:00.01 top 1 root 20 0 25368 3724 3404 S 0.0 0.0 0:00.07 bash 48 root 20 0 55060 24328 9728 S 0.0 0.0 0:00.33 supervisord 60 root 20 0 72304 5872 5140 S 0.0 0.0 0:00.01 sshd 61 root 20 0 9756148 315032 156124 S 0.0 0.1 0:04.16 tensorboard 146 root 20 0 1582996 6964 5296 S 0.0 0.0 0:00.04 server 338 root 20 0 25824 4312 3800 S 0.0 0.0 0:00.18 bash 481 root 20 0 25824 4544 4040 S 0.0 0.0 0:00.18 bash ``` If there is a high load (high CPU usage), processes are generally listed at the top, and you can confirm them by their process names. The CPU usage of a process can be read from the `%CPU` field. Memory usage is a bit more complex, but usually looking at the `RES` field is sufficient. For example, the first Python process mentioned has a CPU usage rate of 101.4% and is using 1.796GB of memory (Tip: If the memory units displayed are different from those mentioned, press the `e` key to switch). ## Redirect Logs Command: `>` ```bash bash theme={null} user@host:/tmp$ python train.py # Normally, logs are output to stdout/stderr. Epoch.1 Iter 20 Epoch.1 Iter 40 Epoch.1 Iter 50 ... user@host:/tmp$ python train.py > ./train.log 2>&1 # Redirect logs from stdout/stderr to the train.log file. In the command 2>&1, 2 represents stderr, and 1 represents stdout. The &1 can be thought of as taking the address, similar to C language. user@host:/tmp$ cat ./train.log # Print the contents of the train.log file to stdout. cat (Concatenate FILE(s) to standard output.) Epoch.1 Iter 20 Epoch.1 Iter 40 Epoch.1 Iter 50 ... user@host:/tmp$ python train.py > ./train.log 2>&1 & # If you add an & at the end, it runs in the background. You can also consider using it in conjunction with nohup. ``` ## Scenario 1 > **Scenario**: The program appears to have stopped, but the GPU memory is still occupied. In general, this situation indicates that the process is seemingly dead but is actually still running. You can use the ps `-ef` command to check if the process is still active. If it is, you can terminate it with the `kill` command. Afterward, you should use `nvidia-smi` to verify whether the GPU memory has been freed. ## Scenario 2 > **Scenario**: You want to save a model or data from an instance to a network drive for use by other instances. ```bash bash theme={null} user@host:~$ pwd /root/ user@host:~$ ls train.py gpuhub-tmp gpuhub-nas user@host:~$ cp -r train.py gpuhub-nas/ # Copy the train.py file into the network drive ``` ## Scenario 3 > **Scenario**: A process is using more memory than the limit allows, causing it to be terminated. You can use the `top` command to monitor the memory usage of processes. Check if the memory usage stabilizes at a certain value or keeps increasing. If it keeps increasing, it indicates that there might be a memory leak in the program. You can then analyze the references of variables in your Python code to optimize and resolve the issue. ## Scenario 4 > **Scenario**: You're running a training process in a JupyterLab terminal as a daemon, and you're concerned about not being able to see the logs after closing the web page. You can use the log redirection feature to write the logs to a file. # MPI Source: https://docs.gpuhub.com/best-practices/mpi An instructions for using MPI on Ubuntu 20.04 > [!NOTE] > > Upon testing, > > it has been observed that the Ubuntu 20.04 system operates normally, > > whereas Ubuntu 22.04 tends to hang. We recommend selecting the Ubuntu 20.04 image for use. > > The underlying cause of this issue remains unknown. > > Should you have any insights or information regarding the cause, we would greatly appreciate your feedback. > > Thank you for your cooperation and support. ## Installation ```bash bash theme={null} # Note: Do not install or use the openmpi package, as it has issues. apt update && apt-get install mpich ``` ## Verification Simple Test: ```bash bash theme={null} # Execute the `ls` command using MPI to see if it can output directories and files. mpirun -n 2 ls ``` Compilation Test: ```bash bash theme={null} # Create a file named `test.c` with the following content: #include #include int main (int argc, char** argv) { int size, rank; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); printf("size = %d rank = %d\n", size, rank); MPI_Finalize(); } # Compile the code to generate an executable file named `a.out`. mpicc test.c # Run the executable. Note that you need to use the absolute path since `a.out` is not in the PATH environment variable. For example, if the test directory is `/root`: mpirun -n 1 /root/a.out ``` # OpenCL Source: https://docs.gpuhub.com/best-practices/opencl OpenCL is a tool that will enable you to perform parallel general-purpose computing on GPUs or other compliant hardware accelerators. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-opencl.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=564272472b016913622e3f5c4bc4278c) If your program uses OpenCL and it fails to work properly after installing OpenCL, you can handle it in the following way: First, check if the nvidia-opencl dynamic link library exists: ```bash bash theme={null} ldconfig -p | grep nvidia-opencl ``` If there is output, it means the library exists (if it does not exist, there is an issue with the system environment; please contact customer service). Then execute the following commands: ```bash bash theme={null} mkdir -p /etc/OpenCL/vendors echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd ``` Finally, check again if OpenCL can be used normally. If it still cannot be used, please contact customer service. # Performance Tips Source: https://docs.gpuhub.com/best-practices/performance The documentation offers performance optimization tips for GPU and CPU usage, code checks, and troubleshooting common issues in machine learning tasks. > [!NOTE] > > First, use the command `nvidia-smi -l 1` to monitor the GPU utilization. > > * If the GPU utilization is 0, check whether your code is correctly calling the GPU for computation. > * If the GPU utilization is already above 90%, consider switching to multi-GPU parallelism or using a more powerful GPU. ## Give a Stress Test If you notice that the training speed is significantly slow, you can use the following code to perform a stress test to rule out hardware issues and observe the GPU utilization: ```python theme={null} import torch m = k = n = 8192 a = torch.zeros(m, k, dtype=torch.float32).cuda("cuda:0") b = torch.zeros(k, n, dtype=torch.float32).cuda("cuda:0") for _ in range(100): y = torch.matmul(a, b) torch.cuda.synchronize("cuda:0") ``` ## Bottleneck Analysis First, determine the characteristics of the model you are training. In terms of performance, there are several scenarios: > **1. Small Model with Simple Data Preprocessing** > > For example, training MNIST with LeNet. In this case, there is limited room for optimization because the model itself has low computational demands. A standard GPU is sufficient, and using a more powerful GPU will result in lower utilization. The GPU utilization in this scenario is typically low but stable. > **2. Small Model with Complex Data Preprocessing** > > For example, using a ResNet-18 network for ImageNet classification. Here, CPU preprocessing takes longer, while GPU computation is very fast and occupies a short period. Therefore, it is better to choose a more powerful CPU and a standard GPU. The GPU utilization in this scenario is highly variable, with high peaks but mostly low values. > **3. Large Model with Simple Data Preprocessing** > > In this case, the GPU utilization is generally high and stable, but the demands on disk performance are also high. If the utilization is low, refer to the methods below to optimize performance. > **4. Large Model with Complex Data Preprocessing** > > This scenario places high demands on both the CPU and GPU, and either can become a bottleneck, including disk performance. Each algorithm needs to be analyzed individually. **For scenarios 1 and 2,** there is limited room for optimization, and it is more appropriate to select the right host and optimize the code to improve cost-effectiveness. **For scenarios 3 and 4,** if the GPU utilization is low, you can follow the methods below to identify bottlenecks and optimize performance. > [!NOTE] > > If the GPU utilization remains at 0, please confirm that Ampere architecture GPUs such as the 3060, 3090, 3080Ti, A4000, A40, A100, and A5000 require **CUDA 11.x** (preferably CUDA 11.1 or higher) to function properly. Please use a higher version of the framework. ### Step 1: Check GPU Utilization Run the command `nvidia-smi -l 1` in the terminal. ``` user@seeta:/tmp/test_directory$ nvidia-smi -l 1 Mon Nov 8 11:55:26 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.82 Driver Version: 440.82 CUDA Version: 10.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 TITAN X (Pascal) Off | 00000000:01:00.0 On | N/A | | 31% 57C P0 66W / 250W | 408MiB / 12194MiB | 2% Default | +-------------------------------+----------------------+----------------------+ | 1 TITAN X (Pascal) Off | 00000000:04:00.0 Off | N/A | | 93% 27C P8 11W / 250W | 2MiB / 12196MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1450 G /usr/lib/xorg/Xorg 32MiB | | 0 2804 G /usr/lib/xorg/Xorg 351MiB | +-----------------------------------------------------------------------------+ ``` If the GPU utilization is 0, it indicates that the code may not be using the GPU. You need to check the code. If the GPU utilization fluctuates significantly and the peak utilization is below 50%, it is likely that the data preprocessing cannot keep up with the GPU's processing speed. Please refer to the steps below. ### Step 2: Check CPU Usage Please locate the instance monitoring button under **Console** -> **Instances**. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/instance-monitoring.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=34341f9348d71610aebe0a0a0a8dc941) To check CPU usage: 1. Assess CPU Utilization: * Assume your instance has 5 CPU cores. * If the CPU utilization is close to 500% (indicating all 5 cores are under high load), this suggests a potential bottleneck due to insufficient CPU capacity. 2. Addressing High CPU Utilization: * Migrate the instance: Move the instance to a host with more CPU cores. * Upgrade the configuration: Increase the CPU allocation for the instance. 3. Optimizing Low CPU Utilization: * If the CPU utilization is significantly below 500%, it indicates that your code is not fully utilizing the available CPU power. * **Adjust `num_workers`:** Increase the CPU load by modifying the `num_workers` parameter in the Torch Dataloader. * **AOptimal Setting:** Set `num_workers` to a value slightly less than the number of CPU cores. * **Test Performance:** Experiment with different `num_workers` values to determine their impact on performance. ### Step 3: Inspect the Code If the above steps do not resolve the issue, please debug the code to identify and analyze the lines that are time-consuming. There are several common coding practices that can impact performance; please review the following: 1. Performing non-computational operations in each iteration: For example, saving test images. The solution is to increase the interval for saving test images to avoid additional time-consuming operations in every iteration. 2. Frequent model saving: This can occupy a significant portion of the training time. 3. Refer to the official performance optimization guides: * [PyTorch Performance Optimization Guide](https://pytorch.org/tutorials/recipes/recipes/tuning_guide.html) * [TensorFlow Performance Optimization Guide](https://www.tensorflow.org/guide/function) > [!NOTE] > > We also welcome you to submit feedback on other cases via the website to share knowledge. ## Others ### NumPy Version Issues > [!NOTE] > > Preliminary Identification Method: If the CPU load is extremely high, with all cores fully utilized, and increasing the number of cores still results in full CPU utilization, while the GPU load remains low, and you are using an Intel CPU, there is a high likelihood that the performance issue is due to the version of NumPy being used. NumPy uses either OpenBlas or MKL for computational acceleration. Intel CPUs support MKL, while AMD CPUs only support OpenBlas. When using Intel CPUs, MKL can offer several times the performance improvement over OpenBlas (especially for certain matrix computations), which can significantly impact overall performance. Generally, using OpenBlas on AMD CPUs is faster than using OpenBlas on Intel CPUs, so there is no need to overly worry about the performance difference when using OpenBlas on AMD CPUs. If you are using an Intel CPU, first verify whether the NumPy version you are using is based on MKL or OpenBlas. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/performacce-numpy-1.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=a0571137585374a73c40cb94df673842) The presence of "mkl" indicates that the version is based on MKL. Sometimes , installing NumPy will default to using the OpenBlas acceleration scheme. You may notice the following OpenBlas-related packages when you install NumPy using `conda install numpy`. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/performacce-numpy-2.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=4f2ea2383adc94c516b025d4d1c14797) Therefore, to install the MKL version of NumPy, follow these steps: 1. Uninstall the current NumPy: `pip uninstall numpy` (or if installed via conda, use `conda uninstall numpy`) 2. Remove the domestic Conda repository: `echo "" > /root/.condarc` 3. Reinstall NumPy: `conda install numpy` If the steps are followed correctly, you will see the following when installing NumPy: ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/performacce-numpy-3.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=d4d97f7690900535a40f8ba65f0a608d) ### PyTorch Thread Count Issues > [!NOTE] > > Preliminary Identification Method: If you are renting a multi-GPU instance and running different experiments on each GPU, this may be the issue. By default, PyTorch creates a number of threads equal to the number of CPU cores for computation. If you rent multiple GPUs in the same instance and run different experiments on each GPU, each PyTorch process will create a number of threads equal to the number of cores. This can cause the system to spend a significant amount of time on thread scheduling rather than computation, leading to a significant slowdown in computation speed and low CPU and GPU utilization. To address this, you can use the code `torch.set_num_threads(N)` to set the number of threads for each process. Additional Tips: * If you are using single-machine multi-GPU parallelism with PyTorch, replacing `torch.nn.DataParallel (DP)` with `torch.nn.DistributedDataParallel (DDP)` generally improves performance. The official statement is: "DistributedDataParallel offers much better performance and scaling to multiple GPUs." * For NVIDIA GPUs with Ampere architecture, such as RTX 3090, using the latest versions of PyTorch 1.9 and 1.10 can significantly improve performance compared to version 1.7. Versions 1.7 and 1.8 have relatively poor performance. (You can switch to a PyTorch 1.10 image in the "More Operations" section after shutting down.) * When using the platform, if your algorithm is resource-intensive, it is best to run different experiments on separate hosts rather than on the same host or within the same instance with multiple GPUs running different experiments. # PyCharm Source: https://docs.gpuhub.com/best-practices/pycharm Learn about developing remotely using PyCharm. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-pycharm.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=b784eb1a4797dcbcffce16436ac12043) > [!WARNING] > > If you use PyCharm to directly run or execute training programs in the terminal, make sure to [start a daemon process with tools like screen or tmux](/container-instance/run-in-background) after debugging is complete. This ensures that the program execution is not affected by SSH connection interruptions! ## Remote Project Development > **[PyCharm Official Documentatione](https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html)** > > []() Work wih GPUhub: **1. Step 1: Confirm to PyCharm Professional edition** Confirm whether the PyCharm you have installed is the Community or Professional edition. **Only the Professional edition supports remote development features**. **2. Step 2: Power on your instance** Copy the SSH command for your instance, for example: `ssh -p 38076 root@region-1.gpuhub.com` In the `ssh -p 38076 root@region-1.gpuhub.com command`, the meanings of the parameters are as follows: * Username: `root` * Host: `region-1.gpuhub.com` * Port Number: `38076` **3. Step 3: Configure PyCharm** Go to **File -> Settings** to open the settings dialog, then search for "interpreter" to find the **Python interpreter** setting option. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=be319bd39783c984365d36bca0e18f23) Click on "Add Interpreter," select "On SSH" and click (this option is not available in the PyCharm Community version). ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=3426526370764e466eeaf02de6ce59ca) Match and fill in the Host, Port, and Username from your instance's SSH command (the Username is always root, and you can find Host and Port in your instance's SSH command). ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=48e7975f3f5929aec6ed41e8259e66f6) Next: Enter the SSH password. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-4.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=8d8eafef39d16f47382a22b590a7161b) Continue to the next step until you see the following prompt. Choose "System Interpreter" and configure the remote Python interpreter path to `/root/miniconda3/bin/python` (if you have installed other virtual environments in miniconda, the path to the Python interpreter of the virtual environment is `/root/miniconda3/envs/{your_virtual_env_name}/bin/python`). Configure the synchronization directory, which means associating the local project with which directory on the remote instance. Here, set it to the instance's data disk directory: `/root/gpuhub-tmp/project/` (Not recommended to use the default `/tmp` directory). ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-5.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=2035a3cba4485d087f4852b5dc881ffe) Click "Create" If the configuration is correct, PyCharm will configure for a short while, and you will be able to develop remotely after completion. If you can't find Python files when running, it might be because the code hasn't synchronized automatically. You can then choose to synchronize manually: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-6.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=6dd1dc48c4d9cd196571f813b9377425) ## Open a Remote Terminal After setting up remote development in PyCharm, you can find and open a remote terminal from the PyCharm terminal dropdown menu by selecting the remote server: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-pycharm-7.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=883765027b884f1e007669061d09fb70) # R (Rstudio) Source: https://docs.gpuhub.com/best-practices/rstudio Due to web issues associated with installing RStudio Server, the following instructions will only cover the installation of the R language. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-rstudio.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=3c0106003637d1dd05f3ed9ab9cea9ff) ## Install R and necessary dependencies Update the package list and install R along with necessary dependencies: ```bash bash theme={null} apt-get update apt-get install -y r-base libgbm1 lib32gcc-s1 lib32stdc++6 libc6-i386 libclang-10-dev libclang-common-10-dev libclang-dev libclang1-10 libgc1c2 libllvm10 libobjc-9-dev libobjc4 libxcb-xkb1 libxkbcommon-x11-0 ``` If you encounter dependency issues when executing the above commands, then run: ```bash bash theme={null} apt -y --fix-broken install ``` ## Verify the installation Enter the command `R` in the terminal: ```r R theme={null} # R R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > 1 + 1 [1] 2 > ``` # SSH Tunnel Source: https://docs.gpuhub.com/best-practices/ssh-tunnel SSH tunneling can proxy a port of the instance to your local machine, or proxy a local port to the instance. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-tunnel.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=5283be7f47c73a538afdfa9bd4a0c2e3) > [!NOTE] > > Windows Users: You can log in using the built-in PowerShell/CMD. For a better terminal experience, it is recommended to download and use the [Cmder](https://cmder.app/) tool, which is ready to use without installation after extraction. Alternatively, the [XShell](https://www.xshell.com/en/free-for-home-school/) tool is an even better option. ## SSH Proxy Command **1. Step 1** Start your service on the instance (for example, if your service is listening on port 6006, use 6006 as an example below). **2. Step 2** Execute the proxy command in the terminal on your local computer (cmd/powershell/terminal, etc.): ```bash bash theme={null} ssh -CNg -L 6006:127.0.0.1:6006 root@123.125.240.150 -p 42151 ``` Replace `root@123.125.240.150` and `42151` with the access address and port of the SSH command for your instance, respectively. `6006:127.0.0.1:6006` means proxying port `6006` inside the instance to port `6006` on your local machine. > [!NOTE] > > It is normal to see no logs after executing this SSH command, as long as it does not prompt you to re-enter your password or exit with an error. > > If you are using cmd/powershell on Windows and are repeatedly prompted for a password error, it may be due to an issue with pasting the password. Try entering the password manually (the password will not be displayed as you type it, which is normal). ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-tunnel-1.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=0e0ce9ba15904b4c09ad174b72d3d2ed) **3. Step 3** Access the service by visiting [http://127.0.0.1:6006](http://127.0.0.1:6006) in your local web browser. Make sure that the port number `6006` matches the port used in the command `6006:127.0.0.1:6006`. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-tunnel-2.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=bc4243227d42eea0a929269423ec354f) ## Common Issues ### Where to Obtain SSH Command? ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-entrance.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=adbb16ae2c4c8ec32175733155fa34aa) ### Errors when running SSH proxy on Windows? There are generally two types of errors: > First type: > > ``` > It is required that your private key files are NOT accessible by others. > This private key will be ignored. > Load key "C:\\Users\\Administrator/.ssh/id_rsa": bad permissions > ``` > > * **Solution:** Change the permissions of the `C:\\Users\\Administrator/.ssh/id_rsa` file mentioned in the error message to read-only for the owner. > Second type: > > ``` > Bad owner or permissions on C:\\Users\\Administrator\\.ssh\\config > ``` > > * **Solution:** Remove the `C:\\Users\\Administrator\\.ssh\\config` file or change its permissions to be read-only for the owner. ### What do the parameters means? Copy the SSH command in the following format: `ssh -p 48332 root@region-3.gpuhub.com`. In the command, the meanings of the parameters are as follows: * Username: `root` * Host: `region-3.gpuhub.com` * Port Number: `48332` The SSH tunnel command would be (assuming you want to forward port 6006 from the instance to your local machine): `ssh -CNg -L 6006:127.0.0.1:6006 root@region-3.gpuhub.com -p 48332` # Sub-Account Source: https://docs.gpuhub.com/best-practices/sub-account Sub-accounts are designed for teams, labs, classrooms, and organizations that need centralized account management with controlled access and spending. With sub-accounts, the primary account can create and manage additional users under the same organization. Team members can focus on launching and using GPU instances, while the primary account keeps centralized control over permissions, budgets, and billing. ### Key Features ### Centralized Account Management The primary account can create and manage sub-accounts from the console. ![](https://mintcdn.com/gpuhub/oJ-JSYNd8UmW6szF/images/subaccount-create.png?fit=max\&auto=format\&n=oJ-JSYNd8UmW6szF\&q=85\&s=f86c82285f2269e5465017c4ce79abf7) Each sub-account has its own login credentials and can be used by a different team member, student, researcher, or operator. ![](https://mintcdn.com/gpuhub/oJ-JSYNd8UmW6szF/images/subaccount-login.png?fit=max\&auto=format\&n=oJ-JSYNd8UmW6szF\&q=85\&s=4472d1f74da4d46e15c7452eea0dd9ac) By default, each primary account can create a limited number (10) of sub-accounts. If you need a higher limit, please contact GPUhub support. ### Permission Management The primary account can configure what each sub-account is allowed to access. ![](https://mintcdn.com/gpuhub/oJ-JSYNd8UmW6szF/images/subaccount-permissions.png?fit=max\&auto=format\&n=oJ-JSYNd8UmW6szF\&q=85\&s=9a488197559ed11ede31da7c88e62f5c) Supported permission settings may include: * GPU Instances * Docker Images * File Storage * Billing and invoices * Account balance usage * Other account-level resources This allows the primary account to decide whether a sub-account can create instances, use saved images, access shared storage, or view billing-related information. ### Shared Balance or Assigned Budget The primary account can decide whether a sub-account can use the primary account balance. If balance sharing is enabled, the sub-account can create and use GPU instances based on the primary account’s available balance. If balance sharing is disabled, the primary account can assign a separate budget or virtual balance to the sub-account. This is useful when you want to control how much each team member or student can spend. ### Spending Control Sub-accounts can be configured with spending limits. This is useful for: * Research groups * Student accounts * Internal teams * Temporary projects * Classroom or workshop usage The primary account can allocate a fixed amount of budget to each sub-account, helping prevent unexpected usage or uncontrolled spending. ### Resource Visibility The primary account can manage which resources are visible or accessible to each sub-account. For example, a sub-account may be allowed to use a specific saved image, create instances, or access shared File Storage, while billing and account management permissions remain restricted. ### Billing Management Billing is centrally managed by the primary account. Depending on permissions, sub-accounts may or may not be able to view billing records, recharge the account, or manage invoices. This allows organizations to keep financial operations under the primary account while still allowing team members to use GPU resources independently. Data and Resource Safety Removing a sub-account does not automatically delete instances, images, storage, or other resources created under the organization. After a sub-account is removed, its related resources remain under the primary account unless manually released or deleted by an authorized user. ## Common Use Cases ### Research Teams A lab owner or project lead can create sub-accounts for researchers and allocate budgets based on project needs. **Classrooms and Training Programs** Teachers or administrators can create sub-accounts for students, assign limited budgets, and control access to GPU instances. **Company Teams** A company can allow multiple team members to create and use GPU instances while keeping billing and financial control centralized. **Temporary Projects** The primary account can create sub-accounts for short-term projects and revoke access after the project ends, without losing the underlying resources. ### Recommended Setup For most teams, we recommend the following setup: 1. Enable sub-accounts for team members 2. Assign a budget to each sub-account 3. Restrict billing permissions to the primary account 4. Allow access only to required instances, images, and storage 5. Review usage regularly from the primary account This setup provides a balance between flexibility and cost control. # TensorBoard Source: https://docs.gpuhub.com/best-practices/tensorboard TensorFlow is a software library for machine learning and artificial intelligence. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-tensorboard.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=d94b6b3d880245cf4fbab84f92092827) The instance on GPUhub comes pre-installed with the TensorBoard tool. You just need to save the TensorBoard event files to the /root/tf-logs/ directory (if you wish to use a different logs folder, see the section below on changing directories), or copy the event files saved in another path to this directory, and then use TensorBoard. ## Default Access Method After powering on the instance, locate the access entry for AutoPanel: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-tensorboard-autopannel.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=79aea5a484f5b882f1a9bfb420ef7592) ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-tensorboard-autopannel-pre.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=5533ddf966877887f9f5e1bffc091f3e) ## Switch TensorFlow Logs Directory If you wish to use a different logs directory, you can manually start another instance of TensorBoard: First, terminate the default TensorBoard process by executing the command: ```bash bash theme={null} ps -ef | grep tensorboard | awk '{print $2}' | xargs kill -9 ``` Then, run the following command in the terminal to start TensorBoard: ```bash bash theme={null} tensorboard --port 6007 --logdir /path/to/your/tf-logs/directory ``` After starting, you can access TensorBoard again through AutoPanel. # Visdom Source: https://docs.gpuhub.com/best-practices/visdom Visdom is a visualization tool that generates rich visualizations of live data to help researchers and developers stay on top of their scientific experiments that are run on remote servers. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-visdom.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=5f0dfe78d118bd8c0a5fef3fd7fda8e5) ## SSH Tunneling Method 1. Start Visdom in the instance (it will listen on port 8097 by default). 2. In the terminal on your local computer, execute the command: ```bash bash theme={null} ssh -CNgv -L 8097:127.0.0.1:8097 root@region-1.gpuhub.com -p 37881 ``` In here, `8097:127.0.0.1:8097` means forwarding the Visdom Server's port `8097` to your local port `8097`, and `root@region-1.gpuhub.com` and `37881` are the access address and port of the instance's SSH command, respectively. Please replace them accordingly. > [!NOTE] > > It is normal not to see any logs after executing the above ssh command, as long as it does not prompt you to re-enter your password or exit. Example: ``` @seeta:~$ ssh -CNg -L 8097:127.0.0.1:8097 root@region-1.gpuhub.com -p 37881 The authenticity of host '[region-1.gpuhub.com]:37881 ([120.92.100.9]:37881)' can't be established. ECDSA key fingerprint is SHA256:eNwieuMEZiNCONaDJXFsAJRBfTnU7f3gQWZ+A2n1j1o. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[region-1.gpuhub.com]:37881,[120.92.100.9]:37881' (ECDSA) to the list of known hosts. root@region-1.gpuhub.com's password: ``` Access `127.0.0.1:8097` in your local web browser to open Visdom. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-visdom-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=162e6c3d2e7e35c52fcd30d12d7cd7be) ## Custom Service Method Start the instance and locate the "Custom Services" entry point. ![](https://mintcdn.com/gpuhub/A2ZFUcrXY6_96IJm/images/bestpractices-visdom-2.png?fit=max\&auto=format\&n=A2ZFUcrXY6_96IJm\&q=85\&s=076b53ef61a25950eaee2373fd2c05c2) From the prompt, it is clear that we only need to start Visdom on port 6006 to access it via the "Custom Services" portal: Start Visdom in the instance and specify the port as `6006`. ``` # If Visdom is not installed, first execute pip install visdom to install it # visdom -port 6006 Checking for scripts. It's Alive! INFO:root:Application Started You can navigate to http://container-7e5111bf0c-8a82bc6b:6006 ``` Additionally, since the Visdom client defaults to connecting to the Visdom server on the original port, you need to modify the construction of the Visdom object in the client code as follows: ```python python theme={null} vis = Visdom(server='http://localhost', port='6006', env='main') ``` After starting, access the custom service in your local browser. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-visdom-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=e73b3130fa33497655a64a8ce4b9cf16) # VsCode Source: https://docs.gpuhub.com/best-practices/vscode Learn about developing remotely using VSCode. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-vscode.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=1c0e2e470c645e9c813436f6740095d9) > [!WARNING] > > If you use VSCode to directly run or execute training programs in the terminal, make sure to [start a daemon process with tools like screen or tmux](/container-instance/run-in-background) after debugging is complete. This ensures that the program execution is not affected by SSH connection interruptions! > **[VScode Official Documentatione](https://code.visualstudio.com/docs/remote/ssh-tutorial)** > > []() Work with GPUhub: Before you start, you need to have VSCode installed. Additionally, you should: 1. **Rent and power on an instance** on GPUhub, and obtain the SSH login information for the instance (login command and password). 2. **Install the VSCode Remote Development extension** on your local machine (Remote-SSH configuration is required). ## 1. Log in to GPUhub and select the powered-on instance Obtain SSH Login Information ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-entrance.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=adbb16ae2c4c8ec32175733155fa34aa) ## 2. Configure Remote-SSH in your local VSCode If you have already installed the **Remote-SSH** extension in your local VSCode development tool, you can skip this step and proceed directly to \[Step 3]. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-extension.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=6247de5dd0b74d729b3384e8640dcd85) ## 3. Establish an SSH connection and log in to your remotely rented instance Click through as indicated in the illustration to complete adding an SSH host. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=6960eaee7bba45ec6a79c75f62f3cd60) Retrieve and copy the login information for your instance. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=04502bc376b788b4dc4c821a5771a240) Login Command: The illustration uses `ssh -p 38909 root@region-1.gpuhub.com` as an example. Press the Enter key to continue the operation. > [!NOTE] > > If there is a "space" at the end of this ssh command, please remove it, otherwise you may not be able to log in. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=300f15e792e465ab9479c13af09e7e82) After pressing Enter, a prompt to customize the SSH config file may appear; you can **ignore it**. Simply press Enter again. You may soon be presented with options to select the remote server's operating system, whether it's Windows, Linux, or Mac. **Please choose Linux**. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-vsccode-connect-4.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=3ff61aedab7c5b196ed8eb5596624080) Enter the password and wait for the SSH login to complete. ## 4. Select your code directory The example code has already been uploaded to the instance's directory. If you haven't uploaded your resources yet, you can refer to the sections on [SCP for remote file](/data/upload-data#remote-copy-via-scp) copying or [JupyterLab](/data/upload-data#uploading-data-with-jupyterlab) to upload your code. > [!NOTE] > > Recommendation: When developing code in VSCode, you can configure the appropriate interpreter based on the programming language you are using. # Vulkan Source: https://docs.gpuhub.com/best-practices/vulkan In machine learning applications, Vulkan can be used to accelerate image processing, data augmentation, and other tasks that require a large amount of parallel computation. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-vulkan.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=dc262224a4370b0faa8481fa975cbddb) If you encounter issues with Vulkan (or other software that depends on Vulkan, such as omnigibson) where the GPU device cannot be found, you can resolve it with the following steps: **1. Step 1: Write the ICD file** ```bash bash theme={null} cat >> /etc/vulkan/icd.d/my_nvidia_icd.json < **[XShell Official Download](https://www.netsarang.com/xshell-download/)** > > []() > [!NOTE] > > Both Xshell and Xftp need to be installed. ## Work with XShell After starting the instance, find the SSH login command. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-xshell-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=35722b1819b4e5fb0dc01668828c2f32) > [!NOTE] > > Please note that the port and other information in the SSH login command need to be replaced with the details corresponding to your instance. Copy the login command as follows (please adjust to match your instance): `ssh -p 44562 root@region-1.gpuhub.com`. Since XShell has a specific command format, you will need to manually modify the format to: `ssh root@region-1.gpuhub.com 44562`, which **places the port number at the end without the need for the `-p` parameter**. For example: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-xshell-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=edec0d617bdb33d7101cdcab3006c35d) After entering the ssh command and pressing Enter, a window will pop up prompting you to enter your password. ## File Transfer with XShell If you have already set up SSH login, you can use the xftp provided by XShell for file transfer in the following way: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/bestpractices-xshell-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=9666d24c98c7b3d4a49a48ed2a0fac1a) # Billing & Pricing Source: https://docs.gpuhub.com/billing-recharge/billing GPUhub Billing and Management Guide GPUHub uses a prepaid account balance model. All service charges are deducted directly from your account balance. Automatic payments and automatic balance top-ups are currently not supported. Please maintain a sufficient account balance to ensure uninterrupted service. ## GPU Container Instances GPUhub offers two billing models for container instance: **Pay-as-you-go** and **Subscription**. ### Pay-as-you-go Model (PAYG) * **Billing Rules:** * **Charges start when the instance is turned on and stop when it is turned off (shutdown state).** The fee is calculated as Duration \* Unit Price, with the duration measured in seconds and a minimum charge of USD0.01. * **Billing occurs hourly and at shutdown.** The fee covers the usage period, with precise measurement down to the second. * **Billing starts based on instance on/off time, not GPU usage.** > [!WARNING] > > In PAYG mode, billing does not stop unless the instance is manually shut down. > [!CAUTION] > > We cannot issue refunds for charges incurred due to instances not being properly shut down for user-side reasons. > * Advantages: > * Flexibility: Supports configuration adjustments (upgrades/downgrades), data disk expansion, and instance migration. > * Cost Control: Billing stops when the instance is turned off (data is retained). > * Disadvantages: > * Higher Costs: More expensive compared to subscription plans. > * No GPU Reservation: GPUs are not reserved after shutdown. If the host lacks available GPUs upon restart, you may need to wait or use alternative solutions (e.g., saving images, migrating instances, or using no-GPU mode). ### Subscription Model (Prepaid) * **Billing Rules:** * **Prepaid:** Pay in full at the time of rental. * **Supports daily, weekly, and monthly rentals.** * **Instance shutdown upon expiration** (data remains intact). * **Renewal options** include daily, weekly, and monthly plans. You can also switch to the pay-as-you-go model (see below for details). > - Advantages: > * GPU Reservation: GPUs are reserved even after shutdown, ensuring availability. > * Cost Savings: More economical for long-term use. > * Disadvantages: > * Less Flexibility: Not as flexible as the pay-as-you-go model. ### Switching Billing Model * **Conversion between pay-as-you-go and subscription models is supported.** If switching from subscription to pay-as-you-go, a refund is provided based on the following rules: * Calculate consumed fees during the subscription period, with the unit price determined by the duration used. For example, if you subscribed for a month but used it for only 8 days, the consumed amount is calculated based on the weekly price (since usage exceeded 7 days). * Refund Calculation: The consumed amount is deducted first using any available vouchers, followed by the balance. Any remaining balance is refunded. Note: Vouchers are not refunded if there is a remaining balance. * Most Economical Usage: Subscribe for a period, then switch to pay-as-you-go billing for a refund. This ensures more cost-effective pricing. ### GPU Pricing **Pricing is subject to the current rates displayed on the GPUhub website.** ## Elastic Deployment ### Pay-As-You-Go Billing (Default) The GPU unit price for instances created through Elastic Deployment is the same as the Pay-As-You-Go (PAYG) rate for the corresponding GPU model. > Total cost = Duration \* Unit price > > * The GPU unit price for instances created through Elastic Deployment is the same as the Pay-As-You-Go (PAYG) rate for the corresponding GPU model. > * Duration = Shut down time - Start time (billed per second, minimum charge USD0.01) 1. **Billing Calculation** * Billing starts when the container is powered on and ends when it is powered off. * Total cost = Duration \* Unit price * Duration = Power-off time - Power-on time (billed per second, minimum charge USD0.01) 2. **Deduction Package** Fees are deducted twice: * Every hour on the hour (for the previous hour's usage) * Immediately when the container is shut down. Usage duration is calculated precisely to the **second**. 3. **Important Note** * Billing is triggered solely by **container started / shutdown time**, regardless of whether the GPU is actively being utilized. ### Duration Package Billing **How Duration Packages Work**: After purchasing a Duration Package, the system will automatically consume hours from the remaining balance in the package during settlement. If the remaining hours are insufficient, any excess usage will be billed at the default pay-as-you-go rate. For Example: > You create a Elastic Deployment and purchase the following Duration Packages: "RTX 5090 1-day package" & "RTX PRO 6000 1-day package" The workload is scheduled across RTX 5090, RTX PRO 6000, and RTX 4090 GPUs. 1. When settling a container that used an RTX 5090, the system prioritizes the RTX 5090 Duration Package. (e.g., 1 hour used → 1 hour deducted from the RTX 5090 package, leaving 23 hours, then settlement for this period = \$0) 2. When settling a container that used an RTX 4090, since no RTX 4090 Duration Package was purchased, it will be billed according to the default pay-as-you-go rules. 3. Containers using RTX PRO 6000 will consume the corresponding package in the same manner. ### Duration Package Refund Policy Refund amount = Minimum of (Total amount paid - Consumed amount, Remaining balance from non-voucher payment methods) (Any unused portion paid with vouchers or coupons will not be refunded) Consumed amount calculation: Consumed amount = Used hours \* Unit price of the corresponding GPU modelRules for calculating consumed value: * If used hours \< 24 hours → Calculated at the pay-as-you-go hourly rate * If used hours ≥ 24 hours → Calculated at the daily package rate * If usage exceeds one week or one month, the weekly/monthly package rate applies accordingly (using the most favorable longer-duration pricing) ## Billing & Shutdown To ensure accurate billing and resource usage control, the platform follows the rules below: 1. Billing Execution Frequency * Billing checks are performed every 10 minutes. 2. Billing Behavior * When the account balance is greater than 0: * Billing is applied at the next hourly boundary (on the hour). * Instances continue running normally. * When the account balance is less than or equal to 0: * If available voucher credits are sufficient to cover the charges: * Billing continues at the hourly boundary as usual. * Instances remain running. * If voucher credits are insufficient: * Billing is executed immediately. * A shutdown event is triggered for the instance. 3. Shutdown Timing Once the balance becomes negative and cannot be covered by voucher credits: * The instance will be automatically stopped within up to 10 minutes. 4. Summary * Billing is aligned to hourly intervals, not triggered exactly at the moment of usage. * System checks run every 10 minutes to enforce billing and resource control. * If funds are insufficient, instances are gracefully stopped within 10 minutes. ## Persistent Storage Services Persistent storage (Data Disk, File Storage and Docker Images) is billed once per day. The system records the maximum storage used during each calendar day. Your daily bill is calculated from that day's peak usage, even if you later delete data before the billing time. > [!WARNING] > > Persistent Storage charges continue as long as the storage resource and its data are retained, including when the instance is shut down or when suitable GPU capacity is temporarily unavailable. ### Data Disk Expansion Expanding the data disk creates a persistent storage resource. This storage exists independently of the running state of the instance. Therefore, shutting down the instance does not stop storage billing. Billing ends only after the expansion is removed or the instance is released. > [!WARNING] > > The extended data disk continues to incur charges even when the instance is shutdown. Billing stops only after the instance is released. If the instance is released today, today's storage charge will still be settled at the next daily billing cycle because billing is based on the day's peak usage. * **Billing Unit Price:** USD0.002/GB/day. * **Billing Rules:** * **Pay-as-you-go Instances:** Paid data disks are settled daily at midnight, regardless of instance status. To stop billing, reduce the disk size to the free tier or release the instance. * **Subscription Instances:** Paid data disks are included in the total fee and paid upfront. After expiration, billing follows the pay-as-you-go rules (daily settlement at midnight). * **Account Balance Insufficiency:** Data is retained to prioritize billing. * If the account owes more than USD10, the platform reserves the right to clean data (with caution). * If overcharged due to delayed data cleanup, we will cover the excess with vouchers (e.g., if you owe USD60, contact support for a USD10 voucher; if you owe USD20, the user is responsible). For Example: > 09:00 - 50GB usage > > 11:00 - 200GB usage > > 18:00 - 120GB usage > > Peak = 200GB > > Charge = 200 × 0.002 = USD0.40 in the next day > > Remark: Even if an instance is cloned but the cloning process ultimately fails and no new instance is created, the expanded portion of the data disk is still billable. This is because storage resources have already been allocated during the cloning process. ### File Storage * **Elastic billing based on actual usage.** Free up to 20GB. * **Billing Unit Price:** USD0.002/GB/day. * **Billing Rules:** * **Charged based on the maximum daily usage,** excluding the free 20GB. Fees are deducted daily at midnight. * **Minimum Fee:** USD0.01 if exceeding the free capacity. * **Account Balance Insufficiency:** Data is retained to prioritize billing. * If the account owes more than USD10, the platform reserves the right to clean data (with caution). * If overcharged due to delayed data cleanup, we will cover the excess with vouchers (e.g., if you owe USD60, contact support for a USD10 voucher; if you owe USD20, the user is responsible). * **Total Storage Capacity:** Default 200GB per user. Contact support for larger capacity. For Example: > If the maximum daily usage is 50GB, the daily fee = (50 - 20) \* 0.002 = USD0.06. ### Docker Image * **Default Limit:** 20 images per user. Contact support for more. * **Billing Unit Price:** USD 0.002/GB/day. * **Billing Rules:** * **Charged based on the maximum daily usage** (excluding the free 30GB). Fees are deducted daily at midnight. * **Minimum Fee:** USD 0.002 if exceeding the free capacity. * **Account Balance Insufficiency:** Data is retained to prioritize billing. * If the account owes more than USD10, the platform reserves the right to clean data (with caution). * If overcharged due to delayed data cleanup, we will cover the excess with vouchers (e.g., if you owe USD60, contact support for a USD10 voucher; if you owe USD20, the user is responsible). For Example: > If the maximum daily usage is 50GB, the daily fee = (50 - 30) \* 0.002 = USD0.40. # Receipt & Invoice Source: https://docs.gpuhub.com/billing-recharge/invoice A receipt is sent automatically once your recharge is complete. Your PDF invoice will be sent to your email within one hour after you receive the receipt. ## Receipt Once your online payment is confirmed in our console, a receipt will be automatically sent to the email address you provided. Please check your inbox. Example: ![](https://mintcdn.com/gpuhub/r4VZhVgHqydACgeB/images/receipt.png?fit=max\&auto=format\&n=r4VZhVgHqydACgeB\&q=85\&s=6c0b279a1dbd075954251aaaf1e161fa) ## Tax Invoice Your invoice will be sent to your email address within one hour after you receive your receipt. > [!WARNING] > > Recharge invoicing WON'T PROVIDE DETAILED invoice of billing later. The portion of the payment covered by vouchers cannot be issued with an invoice. Example: ![](https://mintcdn.com/gpuhub/r4VZhVgHqydACgeB/images/invoice.png?fit=max\&auto=format\&n=r4VZhVgHqydACgeB\&q=85\&s=4fd91e3db57c2b4d9473606356b26eb8) ## Tax Profile GPUhub is a Singapore business and is required to comply with applicable Singapore tax laws and regulations. Choose the tax profile that matches the party making the payment. Tax profile information is used for billing, tax calculation, and invoice issuance. Please provide complete and accurate information that reflects the actual purchaser. > [!NOTE] > > Effective October 5, 2026, at 12:00 AM (UTC+8), a 9% Goods and Services Tax (GST) will be charged to customers in Singapore. GST applicability is determined using the billing and tax information in your Tax Profile. Please do not use placeholder, inaccurate, or another party's information. ### Tax Profile - Individual Choose **Individual** when you are purchasing services for personal use. Enter your full legal name and billing address exactly as they appear on your official records. ![](https://mintcdn.com/gpuhub/r4VZhVgHqydACgeB/images/invoice-title-1.png?fit=max\&auto=format\&n=r4VZhVgHqydACgeB\&q=85\&s=f1a722bde6707f545756738092402c2b) ### Tax Profile- Business Choose **Business** when you are purchasing services on behalf of a company or other legal entity. Enter the registered legal entity name, registered billing address, and applicable business registration or tax identification number. You must be authorized to provide this information on behalf of the business. Use real, current information for every Tax Profile. Incorrect or incomplete details may delay invoice processing or result in an inaccurate tax calculation. ![](https://mintcdn.com/gpuhub/r4VZhVgHqydACgeB/images/invoice-title-2.png?fit=max\&auto=format\&n=r4VZhVgHqydACgeB\&q=85\&s=ff3f1a769e904178d73f9fbfc6311d83) # Recharge Source: https://docs.gpuhub.com/billing-recharge/recharge Currently, GPUhub supports online payments by bank card via Stripe and Airwallex, as well as bank transfers for larger payments. > [!NOTE] > > Auto-recharge and cryptocurrency or stablecoin payments are currently unavailable. ## Online Payment > Bank Card Payment (Supports Credit & Debit Cards) 1. Before you make a payment, please select and fill in the required [Tax Profile](/billing-recharge/invoice#tax-profile) that matches the party making the payment. ![](https://mintcdn.com/gpuhub/r4VZhVgHqydACgeB/images/invoice-tax-profile.png?fit=max\&auto=format\&n=r4VZhVgHqydACgeB\&q=85\&s=de895bb09f4c6f4bc6c4e59b9f49212e) 2. After the online payment is successfully completed, a [Receipt](/billing-recharge/invoice#receipt) and [Tax Invoice](/billing-recharge/invoice#tax-invoice) will be generated automatically and sent to your registered email address within 1 hour. ![](https://mintcdn.com/gpuhub/r4VZhVgHqydACgeB/images/recharge.png?fit=max\&auto=format\&n=r4VZhVgHqydACgeB\&q=85\&s=4d9f9f158b1b4e1ff0d0e46c68ed054a) ## Offline Payment ### Request a Quotation > Need to pay for cloud services via wire transfer? Please contact our billing team ([support@gpuhub.com](mailto:support@gpuhub.com)) to request an **Official Quotation File**. ### Credit Points After a customer signs an offline payment agreement with GPUhub, the actual funds may take several business days to arrive. To prevent any service interruption, GPUhub may grant the customer a temporary credit facility (“Credit Points”) that can be drawn down before the payment settles. 1. **Granting** GPUhub assigns Credit Points to the customer's designated account at its sole discretion once the partnership is confirmed. 2. **Use** The customer converts Credit Points into cash balance on demand. * Each Point converted becomes standard credit balance immediately. * The standard credit balance is used automatically to pay service billings. ![](https://mintcdn.com/gpuhub/doJaS6-iwBagmRJq/images/recharge-credit.png?fit=max\&auto=format\&n=doJaS6-iwBagmRJq\&q=85\&s=5eb793cb57f0625fb255097339f2abbd) 3. **Repayment** Once your offline payment arrives, GPUhub will help you complete the credit repayment by automatically offsetting the outstanding converted amount in the background; any unused Credit Points stay available until they expire or are revoked. 4. **Responsibility** The customer must monitor usage and ensure sufficient Credit Points are available. GPUhub reserves the right to suspend services if the converted balance is exhausted and no further payment is received. # Change Billing Mode Source: https://docs.gpuhub.com/container-instance/change-billing-model Pay-as-you-go Mode & Subscription Mode (Monthly/Yearly) Container instances allow for conversion between the **Pay-as-you-go Mode** and the **Subscription Mode**. The conversion option is accessible by clicking on "Switch to Pay-as-you-go" or "Switch to Subscription" under the "More" actions in the last column of the instance list. ## Subscription to PAYG 1. Switching from a Subscription Mode to a Pay-as-you-go Mode will initiate a refund. * The refund policy calculates the expenses incurred during the subscription period based on the duration of use. * For example, if you subscribed for a month but utilized the instance service for 8 days (Duration over a week) before switching to a Pay-as-you-go Mode, the expense will be calculated at weekly pricing. The expense incurred would be: Weekly Pricing \* (8 / 7) . 2. Deductions of the incurred expense will prioritize the use of any paid coupons first. If the coupons do not fully cover the expense, the remaining amount will be deducted from the paid balance. Any unutilized balance will then be refunded. 3. Note that any remaining balance on the coupons after the deduction will not be refunded. 4. Considering the refund policy, the **most economical usage approach** is to subscribe under the Subscription Mode and then switch to a Pay-as-you-go Mode for a refund if you cease to use the service, allowing for billing at a more cost-effective rate. ## PAYG to Subscription Your instance will be converted immediately, and the selected subscription period will start counting from the moment of conversion. For more specific billing rules, please refer to the [pricing documentation](/billing-recharge/billing). # JupyterLab Source: https://docs.gpuhub.com/container-instance/jupyterlab A guide to using JupyterLab in GPUhub, including its working directory and basic features, to help users work more effectively with data analysis and programming tasks. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-jupyterlab.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=eb2558fb9be649d515406b06aac0f416) > [!WARNING] > > The working directory for JupyterLab is the `/root` directory, not the `/` system root directory. > If you need to access the root directory `/`, you can enter the terminal and use command-line operations. ## Basic Features of JupyterLab ### Accessing JupyterLab Console -> Container Instances -> Jupyterlab ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/instance-jupyterlab.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=268e6454b922f224b31528637016290c) ### JupyterLab Interface ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/jupyterlab-interface.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=d4d1c82843e1e280f8ab1aacf9cef9d4) ### Upload Data ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/jupyterlab-upload-data.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=5b0804f1725ae25b8d73068d5f8dd7ce) ### Working with Notebooks ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/jupyterlab-notebook.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=c2bc3eb5b9f60b77d4767fe4ab54ccab) ### Open a New Terminal ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/jupyterlab-terminal.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=a0fa230ffa6bbe5bb29353da3202a1f2) ### Accessing Open Terminals or Notebooks > [!NOTE] > > In JupyterLab, closing a terminal or Notebook tab does not terminate the process by default; it continues to run in the background. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/jupyterlab-opening.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=924d1a2e12c7a47e9bd115b71dd67e1b) ### File Management 🖰 Right-click folder/file to expand the menu. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/instance-file-management.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=ee826f202ed229a3e173097bdb09d1d2) ## Common Issues > [!NOTE] > > Sometimes, users running programs in a Notebook may notice that after a while, **the Notebook's logs stop updating**. In such cases, you can use the **"Show Log Console"** feature to view the logs. Here's a demonstration of the process: After executing the following piece of code, if you refresh the web page, you will find that the logs no longer update. Open the Log Console. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/instance-log-console.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=858f766531855caaedaa28fffd605e3b) Check the logs and use Debug Mode as necessary. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/jupyterlab-issues.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=369fd7ae27ec5eec6f2d2d5c5af2817e) # Migrate Instance Source: https://docs.gpuhub.com/container-instance/migrate-instance The local data involved in instance migration includes data from the **System Disk and the Data Disk**, both of which can be migrated. When migrating an instance, there are two scenarios: 1. Migrating an instance within the same region (simple and fast). You can directly refer to the [documentation](/container-instance/migrate-instance-sr) for migrating instances within the same region. 2. Migrating an instance across regions. > [!TIP] > > If you frequently encounter situations where there are **"Not enough idle GPUs"**: > > you can switch from a Pay-as-you-go Mode to Subscription Mode (daily or weekly basis). > > Select the subscription pricing option when renting, or for instances you've already rented, click on 'Switch to Subscription' in the 'More' actions for the instance. Please refer to the [documentation](/container-instance/change-billing-model) on changing the billing method for detailed instructions. ## Migrate System Disk Whether migrating within the same region or across regions, it is recommended to use the [image saving](/container-instance/save-image) feature to migrate the system disk. After saving the image, you can select **My Images** to create a new instance in the new region. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/migrate-system-image.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=7ebc596f0ed7f34ca560f750b328b40a) > [!TIP] > > Creating an instance from a private image in a new region may take some time (as the image needs to be transferred from the public network to the new region, and no charges are incurred during the creation process). > > If you're concerned about being billed after the instance is created and started, here's a helpful tip: > > You can **set a scheduled shutdown**. Set the shutdown time to 3 minutes from the current time, for example, if it's 12:00 now, set the scheduled shutdown for 12:03. This way, the instance will automatically shut down after it's created, saving you costs. > > The next time you start the instance or create one in the same region, you'll enjoy faster startup speeds. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/migrate-set-shutdown.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=923fd1bc965d940ae40bf9415f3f5fe9) ## Migrate Data Disk: Same Region Go to the instance's "More" -> "Copy Data Across Instances". This feature copies data at a speed of approximately 100MB/s or more, and even small files have been optimized for very high speed. If you want to copy the entire data disk, simply enter the wildcard character `*` in the "Source Instance Data Path" field. > [!NOTE] > > If you are migrating data from Instance A to Instance B, then: > > * Instance A is the Source Instance, > * and Instance B is the Target Instance. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/migrate-copy-data.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=ad3101babb89b91757cf12f7c9d09b8c) ## Migrate Data Disk: Across Regions > [!WARNING] > > Cross-instance copying will be transmitted over the public network, which is relatively slow, generally around 10MB/s. The speed can be several times slower when there are many small files. For example: To copy a file (folder) from the source instance in **Singapore Region A** to the target instance in **Kuala Lumpur Region A**. Steps are as follows: * Step 1: For the target instance in Kuala Lumpur Region A, assume its SSH command is: `ssh -p 66666 region-3.gpuhub.com` * Step 2: Execute the following command in the terminal of the source instance in Singapore Region A. > [!WARNING] > > Note that the parameter in the command below is `-rP`, not `-rp`. Replace all other parameters with the corresponding values from your SSH command. ```bash bash theme={null} scp -rP 66666 /root/gpuhub-tmp/xxx root@region-3.gpuhub.com:/root/gpuhub-tmp/ ``` This command remotely copies the file/folder (demonstrated here as: /root/gpuhub-tmp/xxx) from the source instance in Singapore Region A to the target instance in Kuala Lumpur Region A. ### Advanced Remote File Copy Method If there are many small files, the direct scp folder method mentioned above can be very slow. You can use the following method to copy. Execute the following command in the terminal of the source instance in Singapore Region A: ```bash bash theme={null} cd /root/gpuhub-tmp/ && tar cf - * | ssh -p 66666 root@region-3.gpuhub.com "cd /root/gpuhub-tmp && tar xf -" ``` This command copies all files in the `/root/gpuhub-tmp` directory of the source instance to the target instance. ### Using 3rd-Party Cloud Drives Method You can first upload the data from the source instance to a cloud disk, and then download the data from the cloud disk to the target instance. For instructions on using a cloud disk, please refer to the public [3rd-Party Cloud Drives documentation](/data/thirdparty-drives). # Migrate Instance (Same Region) Source: https://docs.gpuhub.com/container-instance/migrate-instance-sr For migrating instances within the same region, you can refer to this document. The operation is very simple and the migration speed is fast. **1. Power off the original instance** First, shut down the original instance. **2. Clone the instance** Cloning an instance will create a new instance using the current instance's system disk as a template. If you also need to copy the data disk, then please check the data disk option. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/migrate-clone-instance.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=02b57de185d66c437a953ff2481aa483) After clicking to clone the instance, you can select a new host to create an instance on the instance creation page. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/migrate-clone-data.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=c08bf388c306805febf0deb4240c8e57) > [!TIP] > > If you forgot to check the box for copying the data disk when cloning, you can click **Copy Data Across Instances** in the More Actions of the original instance after the new instance has been created to copy the data disk. **3. Handle billing** If your original instance is on a subscription model, you can contact customer service to transfer the order to the new instance (this method will not result in duration loss due to changes in billing method). If you handle it yourself, simply switch the original instance to a pay-as-you-go billing model. # Multi-Node Multi-GPU Parallelism Source: https://docs.gpuhub.com/container-instance/multi-node-multi-gpu This guide advises using single-node multi-GPU setups for efficiency and provides troubleshooting tips for multi-node parallel computing with GPUs. > [!WARNING] > > Considering that GPUs other than A100 (such as those without InfiniBand or NVLink hardware support) have lower efficiency in multi-node parallel computing compared to single-node parallel computing, we **no longer support enabling internal IP addresses for multi-node parallel computing**. ## Multi-Node Multi-GPU ### Check Network Interface and IP If the `ifconfig` command is not available, install it using `apt-get update && apt-get install -y net-tools`. ```bash bash theme={null} root@container-b8cd119052-124c28e1:~# ifconfig eth0: flags=4163 mtu 1500 inet 172.17.0.4 netmask 255.255.0.0 broadcast 172.17.255.255 ether 02:42:ac:11:00:04 txqueuelen 0 (Ethernet) RX packets 29682 bytes 41859048 (41.8 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 29010 bytes 8195761 (8.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth1: flags=4163 mtu 1500 inet 10.0.0.34 netmask 255.255.255.0 broadcast 10.0.0.255 ether 02:42:0a:00:00:22 txqueuelen 0 (Ethernet) RX packets 171 bytes 9306 (9.3 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 14 bytes 1260 (1.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 1000 (Local Loopback) RX packets 3911 bytes 13589584 (13.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3911 bytes 13589584 (13.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ``` The network interface names may vary across different instances, so it is best to check each instance individually. In the example above, the network interface is `eth1` with an IP address of `10.0.0.34`. (There may be multiple network interfaces. Please select the independent IP address of the enabled instance and its corresponding network interface. The network interface name is usually `eth1`.) ## Testing Download the test script: ``` wget http://gpuhub-public.ks3-cn-beijing.ksyun.com/debug/ddp.py ``` Execute on the master node: ```bash bash theme={null} export NCCL_SOCKET_IFNAME=eth1 # Replace with your own network interface name # Set nnodes to the number of nodes (i.e., instances), nproc_per_node to the number of processes per node (i.e., number of GPUs), node_rank to the node number, and master_addr to the IP address of the master node's network interface. Adjust these four variables according to your actual situation. The master_port does not need to be changed. python -m torch.distributed.launch \ --nproc_per_node=1 \ --nnodes=2 \ --node_rank=0 \ --master_addr="10.0.0.2" \ --master_port=55568 \ ddp.py ``` Execute on the worker node: ```bash bash theme={null} export NCCL_SOCKET_IFNAME=eth1 python -m torch.distributed.launch \ --nproc_per_node=1 \ --nnodes=2 \ --node_rank=1 \ --master_addr="10.0.0.2" \ --master_port=55568 \ ddp.py ``` ## Common Issues If errors or blocks occur, first set the environment variable `export NCCL_DEBUG=INFO` and then run the training command to observe the NCCL debug logs. If you encounter log messages indicating a connection refusal, such as: ```bash bash theme={null} container-xxx:152731:152731 [1] NCCL INFO Bootstrap : Using eth0:172.17.0.4<0> container-xxx:152731:152731 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation container-xxx:152731:152731 [1] NCCL INFO NET/IB : No device found. container-xxx:152731:152731 [1] NCCL INFO NET/Socket : Using [0]eth0:172.17.0.4<0> [1]eth1:172.18.0.16<0> container-xxx:152731:152731 [1] NCCL INFO Using network Socket container-xxx:152730:152730 [0] NCCL INFO Bootstrap : Using eth0:172.17.0.4<0> container-xxx:152730:152730 [0] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation container-xxx:152730:152730 [0] NCCL INFO NET/IB : No device found. container-xxx:152730:152730 [0] NCCL INFO NET/Socket : Using [0]eth0:172.17.0.4<0> [1]eth1:172.18.0.16<0> container-3e581195ae-be8c3f28:152730:152730 [0] NCCL INFO Using network Socket container-3e581195ae-be8c3f28:152731:152775 [1] NCCL INFO Call to connect returned Connection refused, retrying container-3e581195ae-be8c3f28:152730:152783 [0] NCCL INFO Call to connect returned Connection refused, retrying container-3e581195ae-be8c3f28:152731:152775 [1] NCCL INFO Call to connect returned Connection refused, retrying container-3e581195ae-be8c3f28:152730:152783 [0] NCCL INFO Call to connect returned Connection refused, retrying ``` It is highly likely that the `NCCL_SOCKET_IFNAME` environment variable is not taking effect. In this case, you can write the following content into the `/etc/nccl.conf` configuration file, and you will no longer need to add the environment variable separately: ```bash bash theme={null} NCCL_SOCKET_IFNAME=eth1 # Replace with your own network interface name NCCL_DEBUG=WARN ``` Refer to the official documentation: [Environment Variables — NCCL 2.25.1 documentation](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html) # Open Ports Source: https://docs.gpuhub.com/container-instance/open-ports How to expose custom services on GPUhub instances. GPUhub provides public access to each instance's port `6006` and `6008` via a mapped `ip:port`, supporting TCP or HTTP. You can find this `ip:port` via the 'Custom' portal. ![](https://mintcdn.com/gpuhub/A2ZFUcrXY6_96IJm/images/bestpractices-visdom-2.png?fit=max\&auto=format\&n=A2ZFUcrXY6_96IJm\&q=85\&s=076b53ef61a25950eaee2373fd2c05c2) After clicking to access, you can obtain the address, for example: `region-11.gpuhub.com:26040`. `region-11.gpuhub.com` and `26040` are the address and port, respectively. For examples of using this feature, you can refer to [Visdom documentation](/best-practices/visdom#custom-service-method). # Overview Source: https://docs.gpuhub.com/container-instance/overview Our **Cloud GPU Container Instances** is a container that uses Docker technology for resource allocation and isolation. It has the advantages of lower performance loss and higher efficiency compared to virtual machine instances. > [!NOTE] > > Docker is not supported within the container instance. ## About System Disk > [!WARNING] > > The instance's system disk and data disk are generally local SSDs, with a small number being cloud disks. > Local data disks offer good performance but lack redundant copies. > Due to the inherent lifespan limitations of local disks, there is a probability of failure. > Important data should be regularly backed up to [file storage](/data/file-storage) or locally. > Besides, GPUhub does not provide reliability guarantees or services for such storage products. ## Instance GPU/CPU/Memory Allocation In GPUhub the method for renting GPUs involves selecting a physical host and then creating an instance with N GPU cards on that host. The allocation logic for memory and CPU configurations is based on a multiple of the number of GPUs. For example, if the CPU and memory allocation rules on the host are 32GB/GPU and 8 cores/GPU, then: * Renting 1 GPU would result in an instance configuration of **1 GPU, 8 CPU cores, and 32GB of memory**. * Renting 2 GPUs would result in an instance configuration of **2 GPUs, 16 CPU cores, and 64GB of memory**, * and so on. Therefore, when you rent an instance, you should choose an appropriate physical host based on your needs and then select the number of GPUs required. ## Directories within the Instance To check the disk usage within the instance, please execute the command `source /root/.bashrc` in the terminal. | Name | Path | Size | Performance | Description | | - | - | - | - | - | | System Disk | Root directory / and all subdirectories (except for the special paths listed below) | 30GB | Local disk, Fast | Data will not be lost when the instance is shut down. System dependencies and Python packages are typically installed here. It can also be used to store small amounts of data such as code. The system disk is migrated when the [instance is migrated](), and it is included in the image when [saving an image](). | | Data Disk | /root/gpuhub-tmp | Starting from 50GB, can be expanded | Local disk, Fast | Data will not be lost when the instance is shut down. Suitable for storing data with high read/write I/O requirements. Data on the data disk cannot be saved to an image. If you need to migrate data from the data disk, please refer to the [instance migration process (within the same region)](). | | GPUhub File Storage | /root/autodl-fs | Free 20GB, billed for additional capacity | Network disk, Moderate | Enables file synchronization and sharing between different instances within the same region. | | Public Data | /root/gpuhub-pub | Read-only | Network disk, Slow | Directory for commonly used public data and models provided by the platform. Read-only, does not support writing files. | ### Further Explanation of the System Disk In the Linux operating system, almost everything exists in the form of folders or files, and these folders/files share a common root directory `/`. If we install the Linux operating system on a disk A (with no other partitions), the root directory will contain the following default system directories: ```bash bash theme={null} $ ls / bin etc lib mnt proc run tmp var boot dev home root srv sys usr ``` By default, writing files to any directory ultimately writes to disk A. In an GPUhub instance, the system disk refers to this disk A where the system is installed. Writing files to any location under the root directory `/` means writing to the system disk. However, there are exceptions. * For example, if there is another new disk B and we want to use it in the Linux system, we can mount this disk device to a specific directory (assuming the mount directory is `/root/gpuhub-tmp`). In this case, writing "folders/files" to the `/root/gpuhub-tmp` directory means writing to disk B, not disk A. Here, you should understand the boundary between the system disk and the data disk in GPUhub. * For example, system software installed in GPUhub instances and Python dependencies installed using the built-in Miniconda are all installed on the system disk. ## JupyterLab Working Directory The working path of JupyterLab is `/root`. The data disk, network disk, and public data directory are all located under the `/root` directory. Therefore, when you enter JupyterLab, you can directly see these directories created by the platform by default. If you need to view the root directory `/`, you can enter the terminal and use command-line operations. # Remote Desktop Source: https://docs.gpuhub.com/container-instance/remote-desktop The document provides a guide on setting up VNC for remote GUI access on GPUhub instances without needing a full desktop environment. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/logo-turbovnc.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=afa19e6c6ca31194b33642dfd755c097) > [!WARNING] > > Due to the complicated setup and average experience of remote desktops, if it's not a strong necessity for you, it is recommended that you make corresponding adjustments to your code (for example, replace OpenCV's `imshow` with `imsave` to save images and then view them). ## About VNC VNC (Virtual Network Computing) is a graphical desktop sharing protocol that uses the remote framebuffer protocol (RFB) to remotely control another computer. It transmits keyboard and mouse events from one computer to another and forwards graphical screen updates over the network in the opposite direction. For general GUI program execution needs, we can actually use VNC to conveniently implement this without installing a complete desktop environment. Below is an introduction on how to use the TurboVNC tool to run a GUI program within an instance and display it on your local computer: **1. Step 1** Install VNC and some necessary graphics libraries: 1.1 Install basic dependency packages ```bash bash theme={null} # Install basic dependency packages apt update && apt install -y libglu1-mesa-dev mesa-utils xterm xauth x11-xkb-utils xfonts-base xkb-data libxtst6 libxv1 # Install libjpeg-turbo and turbovnc export TURBOVNC_VERSION=2.2.5 export LIBJPEG_VERSION=2.0.90 wget http://aivc.ks3-cn-beijing.ksyun.com/packages/libjpeg-turbo/libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb wget http://aivc.ks3-cn-beijing.ksyun.com/packages/turbovnc/turbovnc_${TURBOVNC_VERSION}_amd64.deb dpkg -i libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb dpkg -i turbovnc_${TURBOVNC_VERSION}_amd64.deb rm -rf *.deb # Start the VNC server, which may involve configuring a VNC password (note that this is not the instance's account password). If there's an error saying xauth is not found, install it again with apt install xauth. rm -rf /tmp/.X1* # If starting again, remove the temporary files from the last time, otherwise it won't start properly USER=root /opt/TurboVNC/bin/vncserver :1 -desktop X -auth /root/.Xauthority -geometry 1920x1080 -depth 24 -rfbwait 120000 -rfbauth /root/.vnc/passwd -fp /usr/share/fonts/X11/misc/,/usr/share/fonts -rfbport 6006 # Check if it has started; if there's a vncserver process, it means it has started ps -ef | grep vnc ``` **2. Step 2** When starting the server, the rfbport=6006 port was manually set. Next, an [SSH tunnel]() will be used to proxy the 6006 port from the instance to your local machine. After completing the above steps, use a VNC client to connect with the address `127.0.0.1:6006`. Use the TurboVNC client on your local computer to connect to the address obtained above. If everything goes well, after entering the password, you will see the graphical interface after a successful VNC connection, as well as the GUI program running on the instance. Additionally, download links for the TurboVNC client for different systems are provided here (you can also download from the [official TurboVNC website](https://turbovnc.org/)). * For Ubuntu: [TurboVNC 2.2.5 for Ubuntu](http://aivc.ks3-cn-beijing.ksyun.com/packages/turbovnc/turbovnc_2.2.5_amd64.deb) * For MacOS: [TurboVNC 2.2.5 for MacOS](http://aivc.ks3-cn-beijing.ksyun.com/packages/turbovnc/TurboVNC-2.2.5.dmg) * For Windows: [TurboVNC 2.2.5 for Windows](http://aivc.ks3-cn-beijing.ksyun.com/packages/turbovnc/TurboVNC-2.2.5-x64.exe) Please note that due to network issues, the parsing of the above URLs was unsuccessful. If you need the content from these web pages, please check the validity of the web page links and try again. If the problem persists, it may be related to the link or network issues, and you might need to retry or contact the website administrator for assistance. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/remote-VNC.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=8fe6552ef89466a86813230856d5d324) **3. Step 3** Add the environment variable in the terminal: `export DISPLAY=:1`, and then run your command (make sure to execute it in the same terminal). You can use the following Python code for a simple verification: ```python python theme={null} import numpy as np import cv2 h = 500 w = 500 img = 255 * np.ones((h, w, 3), dtype=np.uint8) cv2.imshow("", img) cv2.waitKey(0) ``` If the image is displayed in the local VNC client, it proves that the installation and startup process are correct. # Reset System Source: https://docs.gpuhub.com/container-instance/reset-system Resetting the system or changing the image restores the instance to the initial state. > [!NOTE] > > if a community or custom image is used, resetting returns the system to the image's original state, not deleting all data, so the system disk will still be occupied. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/reset-system.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=2a7ffc7dab1ea8b76a70ed125057ab0b) Resetting the system and changing the image will reset the data on the system disk (for what is a system disk, please refer to the [documentation](/container-instance/overview#about-system-disk)), while data on the data disk, cloud disk, and file storage will not be affected. # Run in Background Source: https://docs.gpuhub.com/container-instance/run-in-background Several ways to run your program as a daemon > [!NOTE] > > If you remotely execute programs via SSH or SSH-based tools (such as XShell, PyCharm, VSCode, etc., which can be used for debugging, but for long-term execution, please run commands as daemons), be sure to run your programs as daemons to avoid termination due to SSH connection interruptions, which could cause unnecessary losses. There are several ways to run your programs as daemons: 1. **`screen`**, a tool for multiplexing terminal sessions. 2. **`tmux`**, another commonly used tool (install with: `apt-get update && apt-get install -y tmux`). 3. **JupyterLab** Terminal. 4. **If you are using a Notebook**, refer to the bottom of the JupyterLab [documentation](/container-instance/jupyterlab) for issues related to log updates after network disconnections. ## Jupyterlab The simplest way is to run it through the JupyterLab terminal. As long as JupyterLab does not restart (which is very rare), the terminal will continue to run, regardless of whether the local host is disconnected from the network or shut down. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/open-terminal.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=dc53f3e623b721f7aeb93881e0d3ca5e) If the terminal displays nothing when opened, simply press the Enter key. When running code for an extended period in JupyterLab, it is highly recommended to redirect logs to prevent loss of intermediate logs in case of network disconnections. The method is as follows: ```bash bash theme={null} # Redirect logs to the train.log file. Append this to your command: > train.log 2>&1 python xxx.py > train.log 2>&1 # View logs in real-time tail -f train.log ``` ## screen To install `screen`, execute the following command in the terminal: ```bash bash theme={null} apt-get update && apt-get install -y screen ``` ### Creating a New Session Execute the `screen` command in the terminal, and then press the Enter key in the resulting interface. You will see a terminal that appears identical to the previous one (in reality, there are now two). Programs executed in this terminal are protected by this session. For example, you can run the following command here: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/daemon-screen.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=33ead01b7b172c3c0f4cb677e5e8cba2) > [!TIP] > > If you encounter chinese character encoding issues after opening a terminal with screen, execute the following command and then re-enter the screen terminal: > > ```bash bash theme={null} > echo "defencoding GBK" >> ~/.screenrc > echo "encoding UTF-8 GBK" >> ~/.screenrc > ``` ### Leaving a Session When using the terminal opened with screen, pressing the shortcut keys **Ctrl + a + d** will detach you from the session and return you to the original terminal, displaying the message "detached." This means that the session is simply disconnected, not terminated. ### Re-entering a Session **1. Step 1** Finding all detached sessions `screen -ls` This command will list all available screen sessions, including those that are currently detached. The output will look something like this: ```bash bash theme={null} There are screens on: 12345.pts-0.hostname (Detached) 67890.pts-1.hostname (Attached) 2 Sockets in /var/run/screen/S-username. ``` **2. Step 2** Reattaching to a Specific Session `screen -r ` For example, if the session ID is `12345`, you would run: ```bash bash theme={null} screen -r 12345 ``` **3. Step 3** After executing the above commands, you will find that the ping [www.huggingface.co](http://www.huggingface.co) command is still running. Therefore, you can run your program within a screen session, detach from the session, and then reattach to it when you need to check the logs. For example: ```bash bash theme={null} # Start a new screen session screen # Run the command ping www.huggingface.co # Detach from the session (Ctrl + a + d) # Find the detached session screen -ls # Reattach to the session screen -r 12345 # You will see that `ping www.huggingface.co` is still running. ``` ### Exiting a Session In the terminal opened with screen, use the shortcut key **Ctrl + d**. If there is a running program, first terminate it with **Ctrl + c**. ### Character Encoding Issues Add the `-U` parameter to resolve character encoding problems. For example: ```bash bash theme={null} Creating a new session: screen -U Reattaching to a session: screen -U -r 67890 ``` # Save Image Source: https://docs.gpuhub.com/container-instance/save-image Support saving the [system disk](/container-instance/overview#about-system-disk) (i.e., system environment) of container instances as an image for use by other instances, avoiding the need to reconfigure the system environment repeatedly. ## Save Image ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/save-image.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=b0e3819d09b057d4061fd7e42f82ba9b) For more information, please refer to the [image usage documentation](/environment/image). ## Custom Image > [!WARNING] > > Regarding custom images, GPUHub does not currently support directly pulling and deploying custom Docker images from third-party registries. The recommended workflow is: 1. Create an instance using one of the provided base images and configure your environment within GPUHub. 2. Save the configured environment as a custom image under your account for future reuse. 3. Once the image is successfully saved, you will receive an Image ID. This Image ID can be shared with and authorized for use by other GPUHub accounts. 4. The Image ID can also be used when creating Elastic Deployments, allowing you to launch instances with your preconfigured environment automatically. This approach ensures consistent environments across instances and deployments while avoiding the need to repeatedly configure dependencies and software. # Scale Configuration Source: https://docs.gpuhub.com/container-instance/scale-configuration Only instances with Pay-as-you-go Billing Mode supports configuration adjustments. > [!NOTE] > > For instances with Pay-as-you-go Billing Mode that are already powered on, if you need to increase or decrease the number of GPUs, you can use the scale configuration feature to adjust the instance's settings. For instances with Subscription Billing Mode, if you want to scale up or down, you will first need to switch to Pay-as-you-go Billing Mode before adjusting the configuration. ## Scale Configuration **1. First Step** Power off the instance, then find the scale configuration button under **"More"** and click on it to enter the **"Scale Configuration"** page. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/scale_configuration.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=c093d67d69e9b09fee15a73668251858) **2. Second Step** Select the number of GPUs, at which point the CPU and memory will be adjusted accordingly based on the number of GPUs. You can refer to the **final instance specifications shown below after the change**. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/scale_autoadjust.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=816db66e532970aaba39086e63138580) ## Upgrade Configuration Tips Go to Console -> Instances and click on the instance name in the first column to view the current host's GPU availability, which will help you determine if the host can support further configuration upgrades. If the available GPUs on the current host do not meet your upgrade requirements, you can choose to [migrate to another host]() that satisfies your needs. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/scale_view_gpus.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=4754968645b3ab1814abb7041b15a711) # SSH Source: https://docs.gpuhub.com/container-instance/ssh SSH (Secure Shell) Remote Connection > [!NOTE] > > Windows Users: You can log in using the built-in PowerShell/CMD. For a better terminal experience, it is recommended to download and use the [Cmder](https://cmder.app/) tool, which is ready to use without installation after extraction. Alternatively, the [XShell](https://www.xshell.com/en/free-for-home-school/) tool is an even better option. > [!NOTE] > > Mac Users: You can complete the SSH login using the system's built-in Terminal. ## SSH Authentication After starting the instance, locate the SSH login command. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-entrance.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=adbb16ae2c4c8ec32175733155fa34aa) Copy your SSH login command, which in this demonstration is: `ssh -p 33150 root@connect.singapore-b.gpuhub.com`. > [!NOTE] > > In this command, the meanings of the parameters are as follows: > > * Username: root > * Host: connect.singapore-b.gpuhub.com > * Port Number: 33150 Enter the command in your local terminal and enter your password to log in. *(Note: The password will not display any characters; press Enter after correctly typing or pasting with the 🖰 right-click of your mouse.)* ![](https://mintcdn.com/gpuhub/kr2R5AUmbxkNDmZd/images/ssh-teminal.png?fit=max\&auto=format\&n=kr2R5AUmbxkNDmZd\&q=85\&s=b5d567b74a29be7faa32e00d006218d9) > [!WARNING] > > If you run a training program after logging in via SSH, use screen/tmux to start a daemon process to ensure that the program execution is not affected by SSH connection interruptions! For details on how to use screen, see the section on [Daemon Processes](). ## Passwordless Authentication Access the SSH key login settings from **Console -> Instances** to set up your public key for password-free login. For key generation instructions, see the provided link: [4.3 Git on the Server - Generating Your SSH Public Key](https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key) ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-config-ssh.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=82109f16a6afab64b877a9056b6a4033) ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-set-pwd.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=615f98c5f1c329f7afe645932e80e6c6) # Compress / Decompress Source: https://docs.gpuhub.com/data/compress-decompress This document provides guidance on compressing and decompressing files using various formats and tools on GPUhub instances. > [!TIP] > > If no special compression is needed, use the **.tar** format. It only packages files without compression, which is fast and efficient for files like images and videos that are already compressed. ## Arc Compression Tool Since the installation packages for tools like **zip** and **rar** typically support only one type of compression or decompression, we provide a small utility that supports the following formats: | Compression/Packaging | Decompression/Unpacking | | - | - | | `.zip`, `.tar` | `.tar`, `.zip`, `.rar`, `.7z` | > [!NOTE] > > The provided URL for downloading the arc tool may not be accessible due to network issues or potential problems with the link itself. If you encounter difficulties, please check the validity of the URL and ensure it is correctly formatted. Retrying the download after some time or from a different network may resolve the issue. ```bash bash theme={null} # Download and Install curl -L -o /usr/bin/arc http://gpuhub-public.ks3-sig-sig1.ksyun.com/tool/arc && chmod +x /usr/bin/arc # Compress/Package arc compress xxx.zip path/to/directory # Decompress/Unpack arc decompress xxx.zip # Or decompress to a specific directory: arc decompress xxx.zip path/to/directory ``` If a ZIP file cannot be decompressed using the above command or the `unzip` command, first check the file size. If the file size matches the original, try the following command: ```bash bash theme={null} apt-get update && apt-get install -y fastjar jar xvf xxx.zip ``` ## Commonly Used Compression Tool > **zip** > > ```bash bash theme={null} > # Compress: If the zip command is not installed, install it using: > apt-get update && apt-get install -y zip > > # Then compress the directory: > zip -r .zip > > # Decompress: If the unzip command is not installed, install it using: > apt-get update && apt-get install -y unzip > > # Then decompress the ZIP file: > unzip .zip -d > ``` > **tar** > > ```bash bash theme={null} > # Compress (packing without compression, > # recommended for files that are already compressed like images): > tar -cf .tar > # Decompress: > tar -xf .tar -C > > ``` > **tar.gz** > > ```bash bash theme={null} > # Compress: > tar -czf .tar.gz > # Decompress: > tar -xzf .tar.gz -C > > ``` > **rar** > > > [!WARNING] > > > > Not Recommended: RAR packages are not commonly used on Linux. > > Decompress: If the `unrar` command is not installed, install it using: > > ```bash bash theme={null} > apt-get update && apt-get install -y unrar > # Then decompress the RAR file: > unrar e .rar > ``` # Download Data Source: https://docs.gpuhub.com/data/download-data The following introduces various methods for downloading data from instances. 1. **[FileZilla Software (Recommended):](https://filezilla-project.org/)** Supports both files and folders, and allows for easy drag-and-drop uploading and downloading. 2. **[JupyterLab:](/container-instance/jupyterlab)** Can download files but not folders. The advantage is its simplicity and ease of use. 3. **SCP Command:** Supports both files and folders. Since it is executed via the command line, *it has a slightly higher learning curve*. ## FileZilla Refer to the [documentation](/data/file-storage) for FileZilla. ## JupyterLab ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/download-data.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=20365ca6cb215eaeff4e9edb7e42176f) ## SCP Command > [!NOTE] > > The following commands need to be executed on your local machine to copy data to the instance, not within the instance itself. > > If you are using Windows, the default Windows system does not come with an SSH client. We recommend downloading and using the [Cmder](https://cmder.app/) tool, which is portable and can be used directly after extraction without installation. Copy your SSH login command, which has the format: ```bash bash theme={null} # 35394 is the port number, and region-1.gpuhub.com is the remote address. # Please replace these with your instance's port and address. ssh -p 35394 root@region-1.gpuhub.com ``` > [!WARNING] > > Note that the parameter in the following command is `-rP`, not `-rp`. Then, the SCP command for remotely downloading files is: ```bash bash theme={null} # Note that this command needs to be executed on your local machine. scp -rP 35394 root@region-1.gpuhub.com:/path/to/file_or_folder_in_instance ``` # File Storage Source: https://docs.gpuhub.com/data/file-storage Store your important data and code in here! Including models, datasets, and more — and access them across all your instances. File storage is a network-shared storage that can be mounted to different instances within the same region > **Advantages** > > `1` Shared across instances with multi-point read/write capabilities, unaffected by instance release. > > `2` High data reliability due to multiple redundant copies on the storage backend (Local Data Disks have no redundancy and are more prone to disk failures). > **Disadvantages** > > Generally lower IO performance. > [!WARNING] > > File Storage does not have the ability to quickly synchronize data between different regions. ## Recommendation * **Store your important data and code in file storage** for shared access and high reliability. For training data requiring high IO performance, copy it to the local data disk of the instance to achieve better IO performance. This approach balances convenience, safety, and performance. ## Initialization Enter the Console -> File Storage menu, and initialize the file storage for the corresponding region. After creating an instance in that region and starting it, the file storage will be mounted to the `/root/autodl-fs` directory of the instance. ```bash theme={null} /root/autodl-fs ``` ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/file-storage.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=f88417996c2354f25b251260388e6196) ## Not Mounted 1. Check whether file storage is supported for instances in the region. 2. Check whether the file storage interface has been initialized for the region. 3. If the instance was started before the initialization of file storage, you need to **restart the instance**. 4. Check the **mount status** in **Account → Settings → File Storage**. If the status is "Unmounted", remount the file storage and then restart the instance. 5. For instances created by a sub-account, verify that the sub-account has file storage permissions in **Account → Sub-accounts → Configure Permissions → File Storage**. 6. If the file storage still cannot be mounted, contact customer [support](mailto:support@gpuhub.com) for assistance. ## Cache Cleanup If a web upload is interrupted or files are deleted in JupyterLab, cache files or trash may be generated, occupying file storage space. ### Solution 1: From Console File Storage → More Details → Clean Upload Cache ![](https://mintcdn.com/gpuhub/4iVxYVmi-QlJTvIf/images/filestorage-clean.png?fit=max\&auto=format\&n=4iVxYVmi-QlJTvIf\&q=85\&s=80e15ebe86282b6918cf6ff8b54e5f7b) ### Solution 2: From Terminal Navigate to `/root/autodl-fs`, use `ls -alh` to view hidden files, then permanently delete them with `rm`. ### Disk Full Error > [!WARNING] > > A "disk full" error may unexpectedly occur even when there is sufficient storage space, if the number of files (inodes) exceeds 200,000. File storage has an **inode limit of 200,000**. Since a large number of small files significantly impacts read/write performance, we recommend compressing files before storing them in file storage, and keeping small files on the data disk instead. You can monitor your inode usage at any time in: File Storage → More Details. ![](https://mintcdn.com/gpuhub/4iVxYVmi-QlJTvIf/images/filestorage-inodes.png?fit=max\&auto=format\&n=4iVxYVmi-QlJTvIf\&q=85\&s=3a2e08ccdfe11e05a5796814196ff04b) ## Billing For details on data disk billing, please refer to the [pricing](/billing-recharge/billing#file-storage). ## Data Cleanup > [!WARNING] > > If the account has not logged in for three consecutive months or has an outstanding fee of more than USD10.00, the data in the file storage will be cleared. # Local Data Disk Source: https://docs.gpuhub.com/data/local-data-disk This document explains Local Data Disks, covering capacity, resizing, and billing details. ## Overview 1. The instance's **system disk** and **data disk** are generally local SSDs. 2. Local data disks offer good performance but lack redundant copies. Due to the inherent lifespan of local disks, there is a probability of failure. 3. GPUhub does not provide reliability guarantees or services for such local storage products. > [!NOTE] > > The **system disk** is fixed at 30GB and cannot be resized. > [!NOTE] > > The **data disk** is fixed to the path `/root/autodl-tmp` and cannot be modified. > [!WARNING] > > Important data (e.g., datasets, models) should be regularly backed up to [file storage](/data/file-storage) or local storage. ## Instance Creation When renting an instance, a data disk of 50GB is provided for free. If you need to expand the disk, select a host that supports the required capacity during rental. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/data-local-ex.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=431827bdc8cc78a37712eafcdf3f42b6) ![](https://mintcdn.com/gpuhub/vIB_VhH5cVv_0kai/images/data-disk.png?fit=max\&auto=format\&n=vIB_VhH5cVv_0kai\&q=85\&s=f5d353af21892f8784a1559f3047cf4c) ## Adjust Capacity Resize operations, both expansion and reduction, are also available after renting. > [!WARNING] > > Expanding the instance data disk requires restarting the instance for the changes to take effect. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/data-local-adjust.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=9fff7e4953f8a0a8c4b180440aef404e) ## Billing For details on data disk billing, please refer to the [pricing](/billing-recharge/billing#data-disk-expansion). # Overview Source: https://docs.gpuhub.com/data/overview This document outlines data retention policies, data transfer methods, and public dataset usage for GPUhub instances. > [!WARNING] > > The instance's system disk and data disk are generally local SSDs, with a small portion being cloud disks. > Local data disks offer good performance but lack redundant copies. Due to the inherent lifespan of local disks, there is a probability of failure. > Important data should be regularly backed up to [file storage](/data/file-storage) or local storage. > GPUhub does not provide reliability guarantees or services for such local storage products. ## Data Retention in Instances Data retention rules in instances: 1. Data remains intact during normal operation, shutdown, restart, and even after the expiration of annual or monthly subscription plans. However, instances are subject to a release cycle. An instance will be released if it **remains shut down continuously for 15 days**, and **all data within the instance will be cleared**. 2. Additionally, rented hosts have a lease expiration date. The typical lease period for a host ranges from 3 months to several years. **If a host is no longer available for rent, the instance will also be released when the host is taken offline** (the system will display a red countdown notice on the instance at least 7 days in advance, and you can enable instance expiration/release alerts on the console homepage). Therefore, please pay attention to the lease expiration date of the host and it is recommended to subscribe to instance release/expiration notifications on the console homepage. ## Uploading and Downloading Data Other upload and download methods: > **[Upload Data](/data/upload-data)** > > [](/data/upload-data) > **[Download Data](/data/download-data)** > > [](/data/download-data) ## Data Transfer Between Data Centers There is no dedicated line between our data centers, so transfers between them won't be accelerated. # 3rd-Party Cloud Drives Source: https://docs.gpuhub.com/data/thirdparty-drives Mount third-party cloud drives and file storage as your local disks (simple, secure, and free). ## rclone > [!NOTE] > > Best performance, ideal for global cloud drives ![](https://mintcdn.com/gpuhub/r9oCFVBFaTiJ0BOj/images/rclone.png?fit=max\&auto=format\&n=r9oCFVBFaTiJ0BOj\&q=85\&s=9878ed097d691652ae716aab08d99fb7) What it is: The most popular command-line cloud storage tool worldwide, supports sync + mount as local disk. **Official Docs**: [https://rclone.org/docs/](https://rclone.org/docs/) Natively supported drives (no extra setup needed): 1. Google Drive 2. OneDrive (global + CenturyLink China) 3. Dropbox 4. Aliyun Drive 5. Amazon S3, Backblaze B2, Wasabi, Cloudflare R2, Tencent COS, and most object storages 6. WebDAV, FTP, SFTP, etc. Best for: Users who want maximum speed and mainly use global drives. > [!WARNING] > > Due to container security restrictions, rclone mount (mounting as a local disk) is not supported on GPUhub instances and will fail with permission errors. **Recommended**: Use rclone for sync/copy (fully supported and fast): ```bash theme={null} # Download data rclone copy xxxdrive:datasets/my_data ./data --progress # Upload results rclone copy ./outputs xxxdrive:results/my_run --progress ``` **Alternative**: Serve as WebDAV (access like a network drive): ```bash theme={null} rclone serve webdav xxxgdrive: --addr 0.0.0.0:8080 --vfs-cache-mode writes # Then open http://your-instance-ip:8080 in JupyterLab or browser. ``` For most training tasks, automated copy/sync works best. ## Alist > [!NOTE] > > Easiest to use, perfect for Chinese drives or Netdisk etc. ![](https://mintcdn.com/gpuhub/i0GSJacfP9RzDJVL/images/alist.png?fit=max\&auto=format\&n=i0GSJacfP9RzDJVL\&q=85\&s=876f36d7640456be715965939385b035) What it is: Web-based cloud drive aggregator with a beautiful dashboard and one-click mounting. **Official Docs**: [https://alist.nn.ci](https://alist.nn.ci) Supported drives (especially strong with Chinese closed-source drives): 1. Quark Drive 2. Aliyun Drive 3. Baidu Netdisk 4. 115 Cloud 5. Tianyi Cloud 6. Xunlei Cloud 7. Lanzou Cloud 8. Plus everything rclone supports Best for: Users who mainly use Quark, Baidu, 115, Tianyi, or want a single web UI to manage all drives. # Upload Data Source: https://docs.gpuhub.com/data/upload-data The following introduces various methods for uploading data to instances. 1. **[FileZilla Software (Recommended):](https://filezilla-project.org/)** Supports both files and folders, and allows for easy drag-and-drop uploading and downloading. 2. **[XShell Software (Recommended):](https://www.netsarang.com/en/xshell/)** Manages SSH connections and integrates xftp, which supports drag-and-drop uploading and downloading of folders/files. 3. **[JupyterLab Upload:](/container-instance/jupyterlab)** Similar to cloud drives, it is simple to use but only supports files, not folders. 4. **[GPUhub File Storage]():** Upload data directly to GPUhub File Storage. The advantage is its simplicity and no need to start an instance, but the downside is that the web interface does not support uploading folders. 5. **SCP Command:** Supports uploading and downloading both files and folders. However, since it is executed via the command line, *it has a slightly higher learning curve*. ## FileZilla Refer to the [documentation](/data/file-storage) for FileZilla. ## XShell Refer to the [documentation](/data/file-storage) for XShell. ## Uploading Data with JupyterLab ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/upload-data.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=3452241870a7aa19088bb1e8745daa53) ## Uploading Data via File Storage Refer to the [documentation](/data/file-storage) for File Storage. ## Remote Copy via SCP > [!NOTE] > > The following commands need to be executed on your local machine to copy data to the instance, not within the instance itself. > > If you are using Windows, the default Windows system does not come with an SSH client. We recommend downloading and using the [Cmder](https://cmder.app/) tool, which is portable and can be used directly after extraction without installation. Copy your SSH login command, which typically has the format: ```bash bash theme={null} # Here, 35394 is the port number, and region-1.gpuhub.com is the remote address. # Please replace these with your instance's port and address. ssh -p 35394 root@region-1.gpuhub.com ``` To use SCP to remotely copy files or folders to the instance, the command is: ```bash bash theme={null} # Execute this command on your local machine. scp -rP 35394 root@region-1.gpuhub.com:/root/gpuhub-tmp ``` If you want to copy data from the instance to your local machine, the SCP command is: ```bash bash theme={null} scp -rP 35394 root@120.92.100.9: ``` ### Advanced Usage Methods The direct SCP method for copying folders can be very slow if there are many small files. You can use the following method to copy a `tar` stream: ```bash bash theme={null} # Provided that the tar command is available on your local machine cd tar cf - * | ssh -p 35394 root@region-1.gpuhub.com "cd /root/gpuhub-tmp && tar xf -" ``` # Overview Source: https://docs.gpuhub.com/elastic-deployment/elastic-deployment GPUhub Elastic Deployment GPU is a pay-per-second, on-demand service that instantly launches and manages GPU containers with zero maintenance. Perfect for enterprise AIGC and large-scale inference, just pick an image and GPU spec — we handle provisioning, startup, scaling, and lifecycle in seconds. Pay only for actual runtime, no idle costs. > [!NOTE] > > Elastic Deployment is designed for research institutions and enterprise teams that require managed, scalable GPU deployment for long-running AI workloads. This service is available by request only. If you would like to use Elastic Deployment, please contact us at [support@gpuhub.com](mailto:support@gpuhub.com). > **[GPUhub Elastic Deployment API](/api-reference/api-elastic-deployment)** > > Read [API Documentation](../api-reference/api-elastic-deployment) for more details. > **[Why Not Serverless](/elastic-deployment/why-not-serverless)** > > Why [choose Elastic Containers](../elastic-deployment/why-not-serverless) over Pure Serverless > **[Best Practices](/elastic-deployment/elastic-deployment-best)** > > Efficient deployments, service discovery/load balancing, and container management etc. ## Scheduling Mode Overview ### Resource Partitioning Logic How Resources Are Divided (Computing Power Units)? 1. GPUhub manages multiple physical servers (hosts) with varying setups, including different **GPU models/numbers, CPU cores, and memory amounts**. 2. For each host, **the system automatically divides the CPU and memory** evenly based on the number of GPUs (e.g., if a host has 8 GPUs, it creates 8 "units"). 3. Each unit is a fixed bundle: 1 GPU + a portion of CPU + a portion of memory. **You can't change or split these bundles—it's designed for simplicity.** Simple Example: > * Host A has: 8x RTX 5090 GPUs, 128 CPU cores, 720GB memory. > * Each unit on this host: 1x RTX 5090 GPU + 16 CPU cores + 90GB memory. > * When you create a container (your virtual machine), you can only request 1 to 8 units. The CPU/memory/GPU ratios stay fixed—no custom tweaks. This keeps things straightforward: you pick how many GPUs you want, and the system gives you proportional CPU and memory automatically. ### Creation & Launch Mechanism How Containers Are Created and Started (Scheduling)? 1. When you request a container, you specify basic conditions like: GPU model and count, CPU core range, memory size range, or price limit. 2. The system scans available hosts and picks one that matches your conditions (due to the fixed units and host differences). 3. Once matched, the container starts right away on that host. Simple Example: > Available hosts: > > Host A: 8x RTX 5090, 128 CPU cores, 720GB memory > > Host B: 8x RTX 4090, 64 CPU cores, 720GB memory > > Host C: 8x RTX PRO 6000, 128 CPU cores, 360GB memory > > Your request: 8 GPUs, CPU cores between 100-200, memory between 224-1024GB. > > System matches: Host A or Host C (Host B doesn't meet CPU range). > > If on Host A: You get 8x RTX 5090, 128 CPU cores, 720GB memory. > > If on Host C: You get 8x RTX PRO 6000, 128 CPU cores, 360GB memory. In short, you set loose requirements, and the system finds the best fit quickly - **NO NEED to micromanage hardware details**. If no match, it queues until one is available. This reduces complexity while ensuring efficient use of resources. ## Elastic Scheduling Mode ### Mode 1: ReplicaSet-Type Scheduling > [!NOTE] > > **Applicable Scenarios**: Long-term services requiring high availability, such as web apps, APIs, or persistent inference servers. GPUHub's ReplicaSet refers to creating and maintaining a stable set of containers that are always running and reach the specified number of replicas at any time. Each container replica is scheduled and started according to your set container scheduling conditions. If the scheduling conditions are modified, the system will destroy existing running containers that do not meet the conditions and start new ones that do. Modifying the number of container replicas will immediately create new containers or destroy existing running ones until the number of running containers equals your set replica count. ### Mode 2: Job-Type Scheduling > [!NOTE] > > **Applicable Scenarios**: Batch processing tasks, such as distributed training jobs, data processing pipelines, or one-off computations that run to completion. GPUHub's Job refers to creating one or more containers until the specified number of containers complete execution and exit. Unlike ReplicaSet, Job will not start new containers after one ends to maintain the specified replica count (new containers are only started if the number of completed containers has not reached the target). Instead, completed containers are recorded as done until the number of completed containers reaches the target value, at which point the entire scheduling ends, and no new containers are started. ### Mode 3: Container-Type Scheduling > [!NOTE] > > **Applicable Scenarios**: Simple, single-instance tasks like quick testing, debugging, or short-lived scripts. GPUHub's Container refers to creating only one container until that container ends and exits, ending the scheduling. Equivalent to a Job with target container count=1. ## Container Lifecycle The container's lifecycle depends on the execution lifecycle of your set cmd command. If the cmd execution ends, the container will exit and shut down. Therefore, if the command to start the application in your cmd is backgrounded, add `sleep infinity` at the end of the cmd to prevent the parent process from exiting, which would cause the container to shut down and all other processes to end. The following two methods work (specific commands are examples only): ``` # Method 1 example: python app.py # Method 2 example: nohup python app.py & && sleep infinity ``` In Method 2, the application runs in the background, and sleep infinity blocks the cmd from ending, making the application's lifecycle independent of the container's lifecycle. You need to manage the application's lifecycle independently (i.e., if app.py ends, the container is still running normally, and the application state cannot be inferred from the container state). If you need to manage the application's lifecycle yourself, this method is recommended; otherwise, Method 1 is recommended. Additionally, you can call the API to stop the Elastic Deployment GPU or stop a specific container to complete the container's shutdown. ## Billing Please refer the part of elastic-deployment in [Billing](../billing-recharge/billing#elastic-deployment) for more details. ## Differences Between “Container Instances” and “Serveless Containers” | | Container Instances (Rented in Computing Market) | Elastic Deployment GPU Containers | | - | - | - | | **1. Data Retention Rules** | Have a [data retention period](../data/overview) after shutdown. | Release data immediately upon shutdown and do not retain it. | | **2. Data Disk Expansion** | Support data disk expansion. | Do not support expansion; default data disk size is 50GB. | | **3. Restart Method** | Can be restarted as long as not released. | Cannot be restarted after stopping. If the deployment has stopped, [create a new deployment](../api-reference/api-elastic-deployment#2-create-deployment); if not stopped, adjust the number of running containers by [setting replica count](../api-reference/api-elastic-deployment#4-scale-replicas-replicaset-only). | | **4. Entering Container Method** | (Assumed to support JupyterLab, based on context). | Have no JupyterLab entry; to enter the container, obtain SSH command and password (refer to [Documentation](../api-reference/api-elastic-deployment#7-list-container-events)). | # Best Practices Source: https://docs.gpuhub.com/elastic-deployment/elastic-deployment-best Best practices for choosing deployment types, managing container storage and startup commands, improving service availability, and optimizing repeated deployments. ## Choose a Deployment Type * For one-time tasks, use **Container/Job** deployments. * For services, use **ReplicaSet** deployments. ReplicaSet manages container replicas and starts a replacement if a container exits unexpectedly. For reliable service delivery, combine ReplicaSet with service discovery and load balancing. ## Configure Images and Storage When a container starts, the system pulls its image. Put static environments and files that rarely change in the image. Avoid frequent image updates because each update requires the image to be cached on hosts again and can increase startup time. Store frequently updated files, such as application code and model files, in File Storage. File Storage is shared by containers in the same region and can simplify management across deployments. Its performance is lower than local disks, especially for workloads that read or write many small files. Large-file read and write bandwidth is approximately 100 MB/s. Contact customer support if you need higher performance. > [!WARNING] > > The data disk for each Elastic Deployment container is fixed at 50 GB and cannot be resized. ## Configure Startup Commands The container runs its configured startup command when it starts. When that command exits, the container stops and is released. The command's lifecycle is therefore the container's lifecycle. For example, do not start a service in the background with `python app.py &` as the only startup command. The parent process exits while the application continues in the background, causing the system to stop the container and terminate its processes. If you have a specific reason to run it this way, keep the command active with `python app.py &; sleep infinity`. * For multiple or complex startup steps, put the commands in a shell script stored in the image or File Storage, then use the startup command to run that script. * Use an explicit working directory for relative paths. For example, if `app.py` is in `/root`, run `cd /root/ && python app.py`. * For a Conda environment, `conda activate my-env && python xxx.py` may fail because the startup shell cannot switch environments. Call the environment's interpreter directly, for example `/root/miniconda3/envs/my-env/bin/python xxx.py`. ## Improve Service Availability ### Service Discovery and Load Balancing In a ReplicaSet Elastic Deployment, each container provides an independent HTTPS service address. A container may stop unexpectedly, after which ReplicaSet starts a replacement. To keep the service available, dynamically remove stopped containers' addresses from the registry and add addresses for newly running containers. Service discovery is commonly implemented on the client or server side. The client-side approach below is straightforward and suits GPU workloads with high compute demand, limited GPU VRAM, and long request times. It combines service discovery with load balancing: ![](https://mintcdn.com/gpuhub/KWTzqb6iHv_I4hl6/images/elastic-archi-dia.png?fit=max\&auto=format\&n=KWTzqb6iHv_I4hl6\&q=85\&s=a82dccf24daccbc7199f3adfb7cfcc91) Build a service that polls container status through GPUhub's **Query Container Events** interface. Remove stopped containers from the service registry and register newly running containers. Before making a request, the client retrieves the available service addresses from the registry and selects one according to its load balancing strategy. **Why doesn't GPUhub provide load balancing?** Built-in load balancing could simplify client integrations, but common Nginx strategies offer limited control and cannot accurately account for business-specific GPU utilization. Application-managed routing can make decisions based on workload needs to improve utilization and control costs. ### Stop a Specific Container For a ReplicaSet deployment, you can control the number of running containers by changing the replica count. To stop a specific container, call the **Stop Container** interface with `decrease_one_replica_num`. This stops the container and decreases the deployment's replica count by one, so ReplicaSet will not start a replacement for it. This parameter applies only to ReplicaSet deployments. ### Block a Faulty Host If containers on a particular host repeatedly experience abnormal behavior, use the **Set Scheduling Blacklist** API to prevent deployments from being scheduled on that host. ## Reuse Stopped Containers Image pulls are often the main source of Elastic Deployment startup time. Larger images and more containers starting at once can increase that time. Container reuse can reduce startup time by restarting eligible stopped containers instead of pulling the image and creating new containers. ### How Reuse Works 1. After a container is stopped, the system may retain it in a reusable container pool according to system policy, for up to seven days. 2. When a new container is needed, the system looks for a stopped container matching the deployment conditions, including its image and other parameters. If one is available, it is started for the new deployment; otherwise, the normal image-pull and container-creation process is used. ### Behavior to Know * **Interfaces:** Set `reuse_container` when creating the deployment. Other interfaces work the same way, so enabling reuse does not require changes to the rest of your API integration. * **Container data:** Reuse does not restore the container to the image's initial state. Files from the previous run may remain. Remove any residual data that could affect the next run, or use reuse to avoid copying the same files repeatedly. * **Container UUID:** The GPUhub `ContainerUUID` environment variable contains the current container UUID, including when a stopped container is reused. Set `reuse_container` to `true` when creating a deployment to enable reuse. The setting applies to that deployment only. ## Debug Startup Failures If a container starts and then exits unexpectedly, temporarily change its startup command to `sleep infinity`. Once the container is running, connect through SSH and run the original command manually, such as `python app.py`, to inspect errors interactively. After debugging, update the deployment with the correct startup command. ## Deploy Large Models with Custom Images and File Storage For inference workloads that repeatedly create and release instances, keep the runtime environment separate from model weights. Save the configured runtime as a custom image and store model weights in GPUhub File Storage. This avoids rebuilding the environment and downloading large model files for each deployment. ### Workflow 1. Create an instance with a pre-installed image. 2. Configure and test the inference environment for your model. 3. Save the instance as a custom image and obtain its Image UUID. 4. Store the model weights in File Storage. 5. Create an Elastic Deployment using the custom image. 6. Load the model weights from File Storage and start inference. ### Prepare the Runtime Environment Create a regular GPUhub instance using a suitable [pre-installed image](/environment/overview). Install the frameworks, Python packages, inference engines, system dependencies, and other components your application needs on the system disk. When the environment is ready and tested, [save the instance as a custom image](/environment/image#save-image) for use in future Elastic Deployments. ### Get the Custom Image ID After the custom image is created, find its Image UUID under **My Images**. Select this image when creating future Elastic Deployments. ### Store Model Weights in File Storage Model weights generally should not be included in the custom image. Store them in GPUhub [File Storage](/file-storage), which is shared across instances in the same region and mounted at `/root/autodl-fs`. New Elastic Deployment containers can then access the same files without downloading them again from an external source. ### Create the Elastic Deployment Select **My Images** and choose the custom image prepared above. The container will start with the inference environment already installed, while the model weights remain accessible in File Storage. Configure the startup command to launch the inference service and load the model from its File Storage path. This approach is useful for large-model inference services that need to scale or restart repeatedly. The custom image provides a consistent runtime environment, while File Storage keeps model files persistent and accessible across instances. # Monitoring Source: https://docs.gpuhub.com/elastic-deployment/elastic-deployment-monitoring Active retrieval via API inside the container Use the following code inside the container (container instance or elastic deployment container) to retrieve CPU, memory, and GPU monitoring information. ```python Python theme={null} import requests import json # The URL is the same for all containers; use 127.0.0.1 to retrieve url = 'http://127.0.0.1:2022/autopanel/v1/api/monitor/current' response = requests.get(url) content = response.content.decode() if response.status_code == 200 and "success" in content: metric = json.loads(content)['data'] print(f"CPU Usage: {metric['cpu_usage']} %") print(f"Mem Usage: {metric['memory_usage']} MiB") print("GPU Info:") gpu_metrics = metric.get('gpu_list', []) for gm in gpu_metrics: print(f"\tIdx:{gm['index']} Mem Usage: {gm['memory_used']} MiB Utilization: {gm['utilization']} %") ``` # Update Log Source: https://docs.gpuhub.com/elastic-deployment/elastic-deployment-updatelog Officially released the Elastic Deployment Service to the enterprise on Jan-6, 2026 **Jan-6 2026** ## v1.0.0 We've officially rolled out this feature to our enterprise users! Interested in trying it? Just drop us a line at [support@gpuhub.com](mailto:support@gpuhub.com) to get it enabled. # Why Not Serverless Source: https://docs.gpuhub.com/elastic-deployment/why-not-serverless Why choose Elastic Containers over Pure Serverless "Serverless GPU" promises pay-per-second billing and scaling to zero. GPUhub's Elastic Deployment takes a different path: intelligent container orchestration that prioritizes reliability and performance. This choice reflects the real demands of academic research and production AI workloads. > **Elastic Deployment** > > If you're conducting serious AI / ML training or inference workloads that demand stability, persistence, and low latency, feel confident using our Elastic Deployment—it's designed precisely for these production-grade scenarios. It's stable, controllable, and cost-effective. > **Serverless** > > If you're simply wrapping a newly developed model into an API and launching an app to test your business model in the market, we recommend exploring other Serverless cloud services for optimal cost efficiency on bursty, short-lived requests. ## Limitations of Pure Serverless for GPU Tasks * **Cold Starts**: Seconds-to-minutes delays disrupt low-latency services and interactive workflows. * **Stateless Design**: Unsuitable for long-running training or stateful applications. * **Cost for Sustained Workloads**: Often more expensive for hour- or day-long jobs. * **Limited Control**: Hard to specify exact hardware or debug effectively. * **Ephemeral Storage**: Repeated data loading adds overhead. ## GPUhub's Approach Users set flexible constraints (GPU type/count ranges, price caps, replicas). The system auto-matches hosts and launches persistent containers, supporting: * Rolling updates * SSH access * Persistent storage (HPS) * High-availability, batch, and single-container modes Containers stay active until stopped — delivering near-zero cold starts and predictable costs. ## Best Fit Scenarios * **Pure Serverless**: Bursty, very short (less than 10s) inference tolerant of cold starts. * **GPUhub Elastic Deployment**: Long training, stable inference, interactive development, and persistent workloads — the core of most serious AI projects. ## Conclusion We avoided pure serverless because GPU users need stable, controllable environments — not short-lived functions. Elastic containers empower teams to build real AI applications. # CUDA / cuDNN Source: https://docs.gpuhub.com/environment/cuda-cudnn Install CUDA/cuDNN > [!NOTE] > > If you don't need to recompile code, you typically don't need to install CUDA/cuDNN separately. Frameworks come with precompiled CUDA support, and the framework version corresponds to a specific CUDA version. Therefore, you only need to focus on the framework version and not the CUDA version independently. ## Check Default CUDA/cuDNN Version > [!NOTE] > > The CUDA version displayed by the `nvidia-smi` command only indicates the highest CUDA version supported by the driver, not the actual version of CUDA installed on the instance. To check the default CUDA version installed in the platform's built-in image (installation directory is `/usr/local/`): ```bash bash theme={null} # Query the CUDA version in the platform's built-in image ldconfig -p | grep cuda libnvrtc.so.11.0 (libc6,x86-64) => /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvrtc.so.11.0 libnvrtc.so (libc6,x86-64) => /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvrtc.so libnvrtc-builtins.so.11.0 (libc6,x86-64) => /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvrtc-builtins.so.11.0 ``` To check the cuDNN version installed in the platform's built-in image: ```bash bash theme={null} # Query the cuDNN version in the platform's built-in image ldconfig -p | grep cudnn libcudnn_ops_train.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8 libcudnn_ops_train.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so libcudnn_ops_infer.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8 libcudnn_ops_infer.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so ``` The version number is indicated by the number after `.so` in the output logs. If you have installed CUDA via `conda`, you can check it using the following commands: ```bash bash theme={null} conda list | grep cudatoolkit cudatoolkit 10.1.243 h6bb024c_0 defaults conda list | grep cudnn cudnn 7.6.5 cuda10.1_0 defaults ``` ## Install Other Versions of CUDA/cuDNN ### Method 1: Install using Conda **Advantages:** Simple and easy to use. **Disadvantages:** Typically, header files are not included. If you need to compile code, you will need to install using Method 2. ```bash bash theme={null} conda install cudatoolkit==xx.xx conda install cudnn==xx.xx ``` > **Not sure what the version number is? Search for it.** > > ```bash bash theme={null} > conda search cudatoolkit > Loading channels: done > # Name Version Build Channel > cudatoolkit 9.0 h13b8566_0 anaconda/pkgs/main > cudatoolkit 9.2 0 anaconda/pkgs/main > cudatoolkit 10.0.130 0 anaconda/pkgs/main > cudatoolkit 10.1.168 0 anaconda/pkgs/main > cudatoolkit 10.1.243 h6bb024c_0 anaconda/pkgs/main > cudatoolkit 10.2.89 hfd86e86_0 anaconda/pkgs/main > cudatoolkit 10.2.89 hfd86e86_1 anaconda/pkgs/main > cudatoolkit 11.0.221 h6bb024c_0 anaconda/pkgs/main > cudatoolkit 11.3.1 h2bc3f7f_2 anaconda/pkgs/main > ``` ### Method 2: Install by Downloading and Installing the Package > [!NOTE] > > CUDA Download Address: [CUDA Toolkit Archive](https://developer.nvidia.com/cuda-toolkit-archive) **Installation Method:** After downloading the `.run` installation package: ```bash bash theme={null} chmod +x xxx.run # Add execution permission ./xxx.run # Run the installation package ``` > [!NOTE] > > cuDNN Download Address: [CUDA Deep Neural Network](https://developer.nvidia.com/cudnn) **Installation Method:** 1. Unzip the downloaded file. 2. Move the dynamic libraries and header files to the corresponding directories: ```bash bash theme={null} mv cuda/include/* /usr/local/cuda/include/ chmod +x cuda/lib64/* && mv cuda/lib64/* /usr/local/cuda/lib64/ ``` 3. After installation, add the environment variable: ```bash bash theme={null} echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:${LD_LIBRARY_PATH} \n" >> ~/.bashrc source ~/.bashrc && ldconfig ``` > [!NOTE] > > The default image includes the most basic version of CUDA and cuDNN. If you have installed `cudatoolkit` via Conda, it will generally be used preferentially over the default installation. # Dependency Installation Source: https://docs.gpuhub.com/environment/dependency-installation In GPUhub, all data, including installed dependencies, is retained after shutdown. There is no need to reinstall them upon restart. If you wish to reuse the dependency environment when renting other hosts, you can try to save all data on the system disk as an image. Please refer to the [documentation on saving and loading Images](/environment/image). ## Install Other Python Versions All images come with Miniconda pre-installed. ```bash bash theme={null} # Create a virtual environment named my-env with Python version 3.7: conda create -n my-env python=3.7 # Update the environment variables in .bashrc: conda init bash && source /root/.bashrc # Activate the created virtual environment my-env: conda activate my-env ``` ## Install Other Frameworks ```bash bash theme={null} # PyTorch: Find the appropriate version from Previous PyTorch Versions. For example: conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=11.3 -c pytorch -c conda-forge # TensorFlow: Find the corresponding version link from Install TensorFlow with pip. For example: pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.6.0-cp38-cp38-manylinux2010_x86_64.whl ``` ## Install Python Dependencies ```bash bash theme={null} # Using pip: For example, pip install opencv-python scipy numpy Pillow # Using conda: For example, conda install numpy # Searching for package names: pip search xxxx conda search xxxx # Trick to view available versions if unsure: Write a random version number (e.g., 9.9), # and pip will list all available versions in the error message: pip install xxx=9.9 ``` ## Install System Dependencies ```bash bash theme={null} # Example for installing zip: apt-get update # Only needs to be run once, not every time apt-get install -y zip # Searching for package names: apt-get update # Only needs to be run once, not every time apt-cache search xxxxx ``` ## Install CUDA and Other Dependencies For the installation of CUDA and other software, please refer to the [documentation](/environment/cuda-cudnn). # Docker Image Source: https://docs.gpuhub.com/environment/image This document explains how to save, load, and share custom images on GPUhub, allowing users to replicate and reuse their configured environments across different instances. > [!NOTE] > > GPUhub currently does not support importing custom images. To reuse or save your configured environment for later, you can save it as an image. You can also share these images with others. ## Save Image After shutting down an instance, you can save the entire system disk of that instance by clicking "Save Image" in the "More" menu. ([What system disk is?](/container-instance/overview)) ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/env-save-image.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=894a0603da55e44072ef1329e44bccad) View saved images in the "My Images" menu. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/env-my-images.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=b9dcfd6855286bb8f059f2bc6e3a4331) ## Load Image When creating a new instance or replacing the image of an existing instance, select the saved image you created to restore all the contents of the original instance's system disk. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/env-load-image.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=5a35ec034156ae959949dbddceb4761b) ## Share Image After saving an image, you can click "Share" in the actions menu to share it with specific users. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/env-share-image.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=c19e95430d51a476eaf4975f08ec34f4) # Miniconda Source: https://docs.gpuhub.com/environment/miniconda The platform's built-in images all come with Miniconda installed, and the installation path is /root/miniconda3/. If you need to use other versions of CUDA or cuDNN, you can easily set up the required environment in just a few steps using Miniconda. We recommend **choosing the Miniconda image when creating an instance** (it does not come with any deep learning frameworks pre-installed, keeping the runtime environment clean and avoiding unnecessary issues). The following example demonstrates how to use Conda to set up an environment for TensorFlow 1.15.0. > [!TIP] > > If you need to install the virtual environment on a data disk, please refer to the method described at the end of the document. ## Creating a Virtual Environment ```bash bash theme={null} conda create -n tf python=3.7 # Create a virtual environment named "tf" conda init bash && source /root/.bashrc # Update the environment variables in bashrc conda activate tf # Switch to the created virtual environment "tf" ``` ## Installing Software Dependencies Here is an example of installing TensorFlow 1.15.0. ```bash bash theme={null} # After switching to the Conda virtual environment conda install tensorflow-gpu==1.15.0 # Conda will automatically resolve and install the required CUDA and cuDNN versions for TensorFlow 1.15.0 ``` ```python python theme={null} # Simple test using Python after installation import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) print(sess.run(hello)) ``` ## Switching the Notebook Environment How to Use the New Conda Environment in JupyterLab Notebook ```bash bash theme={null} # Create a new Conda virtual environment (skip if already created) conda create -n tf python=3.7 # Create a virtual environment named "tf" conda init bash && source /root/.bashrc # Update the environment variables in bashrc # Add the new Conda virtual environment to JupyterLab conda activate tf # Switch to the created virtual environment "tf" conda install ipykernel # Install ipykernel to enable kernel integration ipython kernel install --user --name=tf # Set up the kernel for the environment, with "tf" as the kernel name ``` After executing the above commands, if you create a new Notebook, you can select the Notebook named "tf". ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/env-miniconda-notebook-tr.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=01ca64169ef267e91bc6bce7441b1991) If it is an existing Notebook ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/env-miniconda-notebook-tr-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=2e894659abbb1afc407d5e42e7c93b13) ## Clearing the Conda Virtual Environment ```bash bash theme={null} # Clear the installed environment conda deactivate # Exit the current (tf) environment and return to the base environment conda remove -n tf --all # Remove the tf environment ``` ## Deleting Installation Packages and Cache ```bash bash theme={null} conda clean -y --all ``` ## Installing the Virtual Environment to the Data Disk Execute the following commands to set up the virtual environment installation path to `/root/guphub-tmp/conda/envs` and the package cache path to `/root/guphub-tmp/conda/pkgs`: ```bash bash theme={null} mkdir -p /root/gpuhub-tmp/conda/pkgs conda config --add pkgs_dirs /root/gpuhub-tmp/conda/pkgs mkdir -p /root/gpuhub-tmp/conda/envs conda config --add envs_dirs /root/gpuhub-tmp/conda/envs ``` Verifying the Configuration ```bash bash theme={null} # Check if the configured paths are in the file content cat /root/.condarc ``` Cancelling the Configuration for Installing Virtual Environment to the Data Disk Edit the `/root/.condarc` file and delete the lines corresponding to the configured paths. # Overview Source: https://docs.gpuhub.com/environment/overview The platform provides pre-installed images with specific frameworks and versions. If these versions do not meet your needs, see below for methods to configure other versions. > [!NOTE] > > The system version of all platform images is Ubuntu, with the majority being Ubuntu 18.04 and a few being Ubuntu 20.04. > [!WARNING] > > For RTX 5090 and PRO 6000 ([Blackwell Arch.](/environment/pytorch280)), use PyTorch 2.8.0+ stable or a recent nightly build for proper GPU support, multi-GPU training, and best performance. Older stable versions may work slowly or with limited features. > [!CAUTION] > > Additionally, the initial startup of the **Community Images** may take a considerable amount of time (potentially over one hour). Please wait patiently for the system to complete initialization. > **Pre-installed images** > > | Frameworks | Framework Version | Python Version | CUDA Version | > | - | - | - | - | > | PyTorch | 1.1.0 | 3.7 | 10.0 | > | PyTorch | 1.5.1 | 3.8 | 10.1 | > | PyTorch | 1.6.0 | 3.8 | 10.1 | > | PyTorch | 1.7.0 | 3.8 | 11.0 | > | PyTorch | 1.8.1 | 3.8 | 11.1 | > | PyTorch | 1.9.0 | 3.8 | 11.1 | > | PyTorch | 1.10.0 | 3.8 | 11.3 | > | PyTorch | 1.11.0 | 3.8 | 11.3 | > | PyTorch | 2.0.0 | 3.8 | 11.8 | > | PyTorch | 2.1.0 | 3.10 | 12.1 | > | PyTorch | 2.1.2 | 3.10 | 11.8 | > | PyTorch | 2.3.0 | 3.12 | 12.1 | > | PyTorch | 2.5.1 | 3.12 | 12.4 | > | PyTorch | 2.7.0 | 3.12 | 12.8 | > | PyTorch | 2.8.0 | 3.12 | 12.8 | > | TensorFlow | 1.15.5 | 3.8 | 11.4 | > | TensorFlow | 2.5.0 | 3.8 | 11.2 | > | TensorFlow | 2.9.0 | 3.8 | 11.2 | > | Miniconda | conda3 | 3.7 | 9.0 | > | Miniconda | conda3 | 3.8 | 10.1 | > | Miniconda | conda3 | 3.8 | 10.2 | > | Miniconda | conda3 | 3.8 | 11.1 | > | Miniconda | conda3 | 3.8 | 11.3 | > | Miniconda | conda3 | 3.8 | 11.3(cudagl) | > | Miniconda | conda3 | 3.8 | 11.6 | > | Miniconda | conda3 | 3.8 | 11.8 | > | Miniconda | conda3 | 3.10 | 11.8 | > | tritonserver | 24.12 | 3.12 | 12.6 | > | JAX | 0.3.10 | 3.8 | 11.1 | > | PaddlePaddle | 2.2.0 | 3.8 | 11.2 | > | PaddlePaddle | 2.4.0 | 3.8 | 11.2 | > | TensorRT | 8.5.1 | 3.8 | 11.8 | > | TensorRT | 8.6.1 | 3.8 | 11.8 | > | Gromacs | 2022.2 | 3.8 | 11.4 | > | Gromacs | 2023.2 | 3.10 | 11.8 | > **[Installation of Other Python Versions](/environment/python3-x)** > > Refer to the documentation > **[Installation of Other CUDA Versions](/environment/cuda-cudnn)** > > Refer to the documentation > **[Installation of PyTorch: Refer to the documentation](https://pytorch.org/get-started/previous-versions/)** > > Refer to the documentation > **[Installation of TensorFlow](https://www.tensorflow.org/install/pip)** > > Refer to the documentation ## Recommended Usage 1. **First, check if the platform's pre-installed images** include the required versions of PyTorch, TensorFlow, or other frameworks. If available, prioritize using the platform's built-in images. 2. If the platform does not have the desired framework versions, determine the required CUDA version for your framework. For example, PyTorch 1.9.0 requires CUDA 11.1. You can then select a platform image with Miniconda and CUDA 11.1 pre-installed. This allows you to install the required framework without the hassle of setting up cudatoolkit. (The pre-installed CUDA on the platform includes .h header files, which is more convenient if you need to compile code.) 3. If neither of the above conditions is met, you can choose any Miniconda image and install the required frameworks, CUDA, or even other Python versions after the instance is started. ## About 3rd-Party Container Registries At present, GPUHub **DOES NOT support deploying containers using Docker image hosted on 3rd-party container registries**, including but not limited to Docker Hub, GitHub Container Registry, and GitLab Container Registry. This limitation is based on the following considerations: 1. **Security and Compliance** Images hosted on third-party registries vary widely in origin and update behavior, making it difficult for the platform to perform consistent security review and risk control. To ensure platform security and data protection, GPUHub currently supports only verified image deployment mechanisms. 2. **Runtime Environment Consistency** Differences in image build standards, dependency management, and runtime configurations across registries may lead to compatibility issues within GPUHub’s execution environment. Restricting image sources helps maintain system stability and consistency. 3. **Operational and Support Complexity** Supporting third-party registries would significantly increase troubleshooting complexity related to image pulling, authentication, network access, and runtime errors, potentially impacting support efficiency and service quality. GPUHub continues to evaluate more flexible and secure image management solutions and may introduce support for third-party registries in the future, subject to security and stability requirements. # Python 3.X Source: https://docs.gpuhub.com/environment/python3-x Create virtual environments with other Python versions using Miniconda. The platform's built-in images all use Python 3.8. If you need to use other versions like Python 3.6 or 3.7 (for example, TensorFlow 1.14 requires Python 3.6 or 3.7), you can create virtual environments with these versions using Miniconda. ```bash bash theme={null} # Create a virtual environment named "my-env" with Python version 3.7 conda create -n my-env python=3.7 # Update the environment variables in .bashrc conda init bash && source /root/.bashrc # Activate the created virtual environment: my-env conda activate my-env # Verify python ``` # PyTorch for Blackwell Source: https://docs.gpuhub.com/environment/pytorch280 Using RTX PRO 6000 / RTX 5090 GPUs with PyTorch > [!NOTE] > > When using RTX 5090 or RTX PRO 6000 (**Blackwell architecture**), please use the latest images and install PyTorch as follows. ![](https://mintcdn.com/gpuhub/VFlaWwIH5B1lMPUz/images/pytorch280.png?fit=max\&auto=format\&n=VFlaWwIH5B1lMPUz\&q=85\&s=0580cc0ff46bfb0eaa4c364f7674ba01) 1. RTX 5090 and RTX PRO 6000 require CUDA ≥ 12.8 and PyTorch ≥ 2.7.1 to detect and use the GPU at all. 2. **ONLY PyTorch ≥ 2.8.0 nightly builds currently support** multi-GPU (DataParallel / DDP) on these cards. 3. Strongly recommended to install the [nightly version](https://pytorch.org/get-started/locally/#nightly-builds) yourself for now. ![](https://mintcdn.com/gpuhub/VFlaWwIH5B1lMPUz/images/pytorch-nightly.png?fit=max\&auto=format\&n=VFlaWwIH5B1lMPUz\&q=85\&s=97e8b83d3a8456a8cc98a13173be8851) # GPU Memory Not Released Source: https://docs.gpuhub.com/faqs/gpu-memory-not-released XXX First, use the `nvidia-smi` command to check the GPU usage. If you find that the program has already terminated but there is still GPU memory occupied, it indicates that a residual process is holding the memory. You can release it as follows: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-gpu-memory-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=169979c971b52a5a1ef450bbca9d63e1) From the screenshot, it can be seen that a program is occupying 4388MiB of GPU memory. To release the memory, first identify the process ID: Use the `ps -ef` command. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-gpu-memory-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=95d43538913cc9a09dbdae7fcfb82396) You can see three important columns: PID, PPID, and CMD, which represent the process ID, parent process ID, and the command used to start the process, respectively. By examining the command, you can determine which processes were started by your program. For example, `python train.py` in the screenshot is a process I started, while others are system processes or unrelated to GPU memory usage. * Next, terminate the process: * From the screenshot, the process IDs for `python train.py` are `594` and `797`. You can use the `kill -9 594 797` command to end these processes. However, when many processes occupy GPU memory, especially in multi-GPU parallel scenarios, this method can be cumbersome. * Here is a more powerful way to terminate processes: * Using ps `-ef`, you can see that all my processes contain the keyword `train` (and other unrelated system processes do not, to avoid accidental termination). You can filter your processes using the `grep` command, for example: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-gpu-memory-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=39d875f0b33bb8241fc9921fa7311dbb) Next, obtain the process IDs using the `awk` command. The `awk` command is complex, but you only need to remember the following command: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-gpu-memory-4.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=867604d4866e2948c5bde5d70c53d610) Finally, use the kill command to terminate the processes. The complete command is: `ps -ef | grep train | awk '{print $2}' | xargs kill -9` ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-gpu-memory-5.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=226d1d9ddba17f44a33660304eefbbef) The output may include an error message like "No such process", which can be ignored. This occurs because the `grep train` command itself generates a process that gets filtered out. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-gpu-memory-6.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=4bdd14931dea11102058985a583ab958) More Explanation: In Linux commands, the `|` symbol is called a pipe. Its function is to use the output of one command as the input for the next command (usually stdout; stderr requires separate handling). Pipes are very useful in many scenarios. For example, if a directory contains tens of thousands of files, but only one is a `.txt` file while the others are images, manually searching through the list generated by `ls` would be very cumbersome. Instead, you can use: `ls | grep "\.txt$"` # JupyterLab Fails to Open Source: https://docs.gpuhub.com/faqs/jupyterlab-fails-to-open Typically caused by dependency installation or network connection issues. ## Issue Type 1: Dependency installation If JupyterLab fails to run due to dependency changes during package installation, log in via [SSH](/container-instance/ssh) and run `jupyter-lab` to check. If it errors, reinstall JupyterLab using `pip install jupyterlab` and restart the instance. (Windows users can SSH via CMD or PowerShell, but may need to **manually enter the password** instead of pasting it.) * If you see normal output after entering `jupyter-lab`, JupyterLab is working correctly. * If you encounter errors like the ones below, JupyterLab cannot start. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-jupyterlab-fails-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=110cce8812b0067443191141b33dc57f) Solution for JupyterLab startup errors: Reinstall JupyterLab. * If the `pip` command is missing, run `conda install pip` first. * If `conda` is missing, you may have deleted Miniconda, and the simplest solution is to reset the system. 1. Uninstall the current JupyterLab: `pip uninstall jupyterlab` 2. Reinstall JupyterLab: `pip install jupyterlab` ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-jupyterlab-fails-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=354e27fd7cde0caebc6528f37a8da1e5) ## Issue Type 2: Network Connection If the first issue is ruled out, the problem is likely network-related: 1. Close all running VPN connections. 2. If access is still not possible after closing the VPN, you may need to turn the VPN back on and switch it to Direct mode. 3. If your VPN does not have a Direct mode, choose PAC mode (avoid using Global mode). 4. Try accessing with a different browser. 5. Contact customer support if the issue persists. # Others Source: https://docs.gpuhub.com/faqs/others The mysteries unfold in question. ## Why is my program stuck with no output? First, use the top and nvidia-smi commands to check CPU and GPU usage. If the CPU is at 100% and the GPU is idle, it likely means the program is stuck at a GPU call. Refer to the answer to the previous question for more details. If not, debug the code by adding print statements to key lines to identify where the program is hanging. Then, search online for the specific issue. Always analyze the code instead of guessing blindly. *** ## Why am I encountering CUDA OOM (Out of Memory)? If your program reports OOM, start by setting the batch size to 1 and gradually increase it to see when it fails. This will help you decide whether to [upgrade your configuration](/container-instance/scale-configuration) or switch to a GPU with more memory. If the first run is fine but subsequent runs fail, use `nvidia-smi` to check for residual GPU memory usage. If there is usage, terminate the lingering process with ps `-ef` and `kill -9 `. If not, the program might inherently require more memory during computation, especially with dynamic frameworks. *** ## What if there are not enough idle GPUs on the host? You can either start the instance in "[no-GPU mode](/best-practices/cost-saving)" to download important data or [migrate the instance](/container-instance/migrate-instance) to another host. Alternatively, wait for GPUs to become available on the current host. *** ## Why can't I connect to VSCode or SSH after changing the instance image? For Linux/Mac users, delete the local known\_hosts file by running `rm ~/.ssh/known_hosts`. For Windows users, delete `C:/Users//.ssh/known_hosts`. Then, retry the connection. *** ## Can I use vouchers for annual or monthly plans? Some vouchers are applicable. Check the scope of use for your voucher. Vouchers can be stacked and will prioritize balance deductions. *** ## Will GPUs be reserved after shutting down an annual/monthly instance? GPUs will be reserved throughout the annual/monthly period. You can restart at any time without worrying about other users occupying the GPU. *** ## Can multiple GPUs in one instance be used in parallel? Multiple GPUs within the same instance on the same physical host can be used in parallel. For multi-node parallelism, contact customer support. *** ## How is billing handled if the GPU price changes mid-way for a pay-as-you-go instance? Billing is based on the price at the time of startup. Price changes during runtime do not affect billing. If you restart the instance, the latest price will be applied. *** ## Can I recover data from a released instance? No, data cannot be recovered once the instance is released. *** ## What if the host of my instance experiences hardware failures like disk or GPU issues? You can either migrate the instance to another host or wait for the host to be repaired and brought back online. The platform will provide compensation for such situations. *** ## Can data on instances be accidentally damaged or lost? Local data disks on instances are mostly physical disks without redundancy, so data loss is possible. Important data should be backed up regularly. Data stored on shared cloud disks, however, use multi-replica redundancy and have a very high reliability. *** ## Will closing the browser or logging out affect programs running on JupyterLab(Notebook)? No, it will not affect the running programs. However, ensure logs are saved properly, such as redirecting them to log files. Refer to the [documentation](/container-instance/run-in-background) for more details. *** ## How can I ensure a program continues running after an SSH connection is disconnected? Use the JupyterLab terminal to run commands or use tools like screen or tmux. Refer to the section on [daemon processes](/container-instance/run-in-background) for more information. *** ## Why did my program get terminated with a "Killed" message? The program was terminated by the system due to excessive memory usage. You can check memory usage via the instance monitoring dashboard. Solutions include upgrading your instance configuration or switching to a host with more memory, as memory allocation is linearly proportional to the number of GPUs. # SD Image Generation Memory Leak Source: https://docs.gpuhub.com/faqs/sd-image-generation-memory-leak If you experience continuous memory growth while generating images or switching models in the AUTOMATIC1111 SD WebUI, you can try the following solution: ## Steps to Resolve Memory Growth Issues 1. Install Dependencies ```bash theme={null} apt install libgoogle-perftools-dev ``` 2. Set Environment Variable Before Launching WebUI Verify the existence of `libtcmalloc.so.4` using: ```bash theme={null} ldconfig -p | grep libtcmalloc.so.4 ``` If found, set the environment variable: ```bash theme={null} export LD_PRELOAD=libtcmalloc.so.4 ``` 3. Launch WebUI After setting the environment variable, start the WebUI: ```bash theme={null} python launch.py --port 6006 ``` Source This solution is derived from Discussion ["Linux - Use tcmalloc for memory management for slight speed boost and much, MUCH lower CPU memory leakage" #6722](https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/6722) on the AUTOMATIC1111 SD WebUI GitHub repository. # SSH-Based Connection Exception Source: https://docs.gpuhub.com/faqs/ssh-based-connection-exception When you encounter connection issues with VSCode, PyCharm, or other SSH-based tools, please follow the steps below. > [!NOTE] > > If you are using XShell, MobaXterm, or similar tools and encounter connection issues, please refer to the [relevant documentation](/best-practices/xshell) instead of the solutions below. ## Possible Causes: 1. SSH Fingerprint Change: * If the system disk of the instance is reset or the image is changed, the SSH fingerprint will change. This will cause an error when connecting via SSH: "REMOTE HOST IDENTIFICATION HAS CHANGED." 2. Incorrect Local SSH Config File Permissions: * If the permissions of the local SSH config file are incorrect, you may encounter errors when SSH tries to write to the configuration (or other files). 3. VSCode/PyCharm Connection Issues: * VSCode may fail to distinguish between different instances when connecting to the same host on different ports, leading to incorrect connections and failures. ## Troubleshooting Steps: ### Step 1: Check the First Two Causes * For Windows Users: Open PowerShell by searching for it in the Start menu. * For Mac Users: Open Terminal by searching for it in Spotlight. Enter the complete SSH command for your instance and press Enter. If the connection is successful, you will see output similar to the following: ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-ssh-connection-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=d0c1e6fedade6f8f96d5b2e72ccfab9d) > [!NOTE] > > If the connection is normal, you do not need to proceed to the next step (i.e., no need to enter a password). You can then proceed to Step 2 to troubleshoot VSCode/PyCharm issues. If you encounter errors like the following and the SSH connection exits: ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/faq-ssh-connection-2.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=b7b6124d914f6ad67cc6bb96de2e567a) Other possible error messages include: ``` Bad owner or permissions on C:\Users\USER\.ssh\config Load key "C:\Users\USER\.ssh\id_rsa": bad permissions ``` Solution: * Delete the `known_hosts` and \`config files mentioned in the error messages (these are local files, and the paths may vary for each user). * If there is a permission error with the RSA key, Windows users should set the key file to read-only. For Linux/Mac users, run `chmod 600 ` to correct the permissions. ### Step 2: Troubleshooting VSCode and PyCharm Connection Issues VSCode Connection Issues: * Common Cause: HOST conflicts. For example, if you rent two instances (A and B) in the same region with the same host name but different ports, VSCode may write identical HOST alias entries in the `ssh/config` file. When instance A is shut down and instance B is started, VSCode may incorrectly connect to instance A instead of B, resulting in a connection failure. * Solution: * Quick Fix: Delete the `C:\Users\USER\.ssh\config` file. * Elegant Solution: Edit the `config` file and modify the `Host` field (alias name) to differentiate between instances before reconnecting. PyCharm Connection Issues: * Cause: PyCharm's complex encapsulation and lack of visible logs require troubleshooting based on the error messages provided. # System Disk Space Insufficient Source: https://docs.gpuhub.com/faqs/system-disk-space-insufficient First, identify which directory is occupying the system disk space. If you are unsure what the system disk is, please refer to the help [documentation](/container-instance/overview). You can check the usage of the system disk and data by running the command source `~/.bashrc`. The following two directories can be directly deleted without affecting system operation, so **start by removing them**. If this does not free up space, proceed to the next steps: ```bash theme={null} du -sh /root/miniconda3/pkgs/ && rm -rf /root/miniconda3/pkgs/* # Conda's historical packages du -sh /root/.local/share/Trash && rm -rf /root/.local/share/Trash # JupyterLab's trash ``` The following directories may occupy significant space, but you should clean them based on your specific situation: ```bash theme={null} du -sh /tmp/ du -sh /root/.cache ``` ## Normal Cleanup Steps First, check the disk space used by files and directories. Folders under the system/root directory generally do not occupy significant disk space, so you should mainly focus on the directories or files that you have created. ### File Size Use the ls -alh command to check the sizes of files such as `.bashrc` and `.profile` in the example below. However, **the size displayed for directories is only the size of the directory itself, not the total size of all files within the directory**. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-disk-space-1.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=8f1298e361ad408b63a39e185946a9c1) ### Directory Size Use the `du -sh xxx` command to recursively calculate the total size of all files within a directory. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-disk-space-2.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=e777fd34684dcc21991b15344783653d) ### Deletion Use `rm -rf xxx` to delete files or directories and free up space. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/faq-disk-space-3.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=afa8d3d90cc71494be4da59da71f49f1) ### Special Folders Not Occupying System Disk Space `/root/autodl-tmp` `/root/autodl-nas` `/root/autodl-pub` `/root/autodl-fs` ## Clearing All Data If you no longer need the data, you can clear everything by clicking "Reset System" in the "More" operations of the instance. This will clear the system disk. # Unable to Call GPU Source: https://docs.gpuhub.com/faqs/unable-to-call-gpu Solve the issue of being unable to call the GPU. First, use the `nvidia-smi` command to check the GPU usage. > [!NOTE] > > The red boxes marked below indicate the GPU memory usage and GPU utilization rate, respectively. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/faq-unable-gpu.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=99ba3748e10aa61387b99ba99f1d6aea) When the program starts running: 1. No GPU memory usage This may indicate that the installed framework is a non-GPU version. Check as follows: * If you are using PyTorch: ```python python theme={null} import torch print(torch.__version__) ``` If the version number contains "cu" (e.g., cu113, cu111), it indicates a CUDA version; otherwise, it is a CPU version. * If you are using TensorFlow: ```python python theme={null} import tensorflow as tf sys_details = tf.sysconfig.get_build_info() print(sys_details["cuda_version"]) ``` If CUDA version information is displayed, it indicates a GPU version; otherwise, it may be a CPU version. 2. GPU memory is used, GPU utilization is non-zero but fluctuates significantly This indicates that the program is using the GPU, but the utilization is unstable. You can optimize the code to improve GPU utilization. Refer to relevant [documentation](/best-practices/performance.mdx) for guidance. 3. GPU memory is used, but GPU utilization remains at 0 This situation can be divided into two cases: * If using Ampere architecture GPUs (e.g., 30-series cards, A40, A100, A5000), CUDA 11.x is required. * If the code is not calling the GPU for computation, the framework may still allocate GPU memory when importing the framework and building the network. This results in GPU memory usage without actual GPU computation. You can verify this with the following code: ```bash bash theme={null} wget http://gpuhub-public.xx3-sig-sig.xxxx.com/debug/dp_res18.py python dp_res18.py ``` If the GPU utilization is non-zero after running the above code, it indicates that your code may not be calling the GPU for computation. Check and debug your code. If the code execution fails, contact customer support for assistance. # VSCode Remote Connection Failed Source: https://docs.gpuhub.com/faqs/vscode-remote-connection-failed Solving VSCode Remote Connection Issues ## Issue If you encounter the following error in the VS Code output during remote connection, you can refer to the solution below. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/faq-vscode-failed-1.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=7eb5e543bc5e097af73a582973337840) ## Solution 1. Open Extensions Sidebar Open the Extensions sidebar on the left, find the installed "Remote - SSH" extension, right-click on it, and select "Extension Settings". ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/faq-vscode-failed-2.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=7f9d62883e502c5370aad1d787b58b15) 2. Edit Config File In the "Config File" section, enter the path of the config file mentioned in the error message. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/faq-vscode-failed-3.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=cbfca024e677d2fc6c5ccc3b8130bbb5) 3. Retry Connection Try reconnecting and observe whether the issue is resolved. # GPU Benchmarks Source: https://docs.gpuhub.com/gpu-selection/gpu-benchmarks Only considering official compute power doesn't give a full picture of GPU differences and quality. Memory bandwidth also significantly impacts total time. Here, we compare different GPUs using deep - learning tasks. Test details: * Tested GPUs on GPUhub (single - card tests) using PyTorch = 1.9.0. * Input was pseudo - data made by torch.zero, so CPU preprocessing and IO didn't affect results; GPU performance was key. * Tested ResNet50 (many activations, sensitive to memory bandwidth) and ViT Transformer (many convolutions, sensitive to compute power). * Results include FP32 and FP16 (not mixed - precision). Compare as per your needs. * GPU memory size is also key. Check the document for parameter comparisons and detailed hardware specs. GPU memory size is also important. Check the [document](/gpu-selection) for theoretical parameter comparisons and specialized [leading tech community](https://www.techpowerup.com/gpu-specs/) for detailed hardware specs. ```python 3090 theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 2294.06 images/s in 0.837s. Iteration 1, 2391.29 images/s in 0.803s. Iteration 2, 2396.06 images/s in 0.801s. Iteration 3, 2394.62 images/s in 0.802s. Iteration 4, 2402.61 images/s in 0.799s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 1453.34 images/s in 1.321s. Iteration 1, 1490.90 images/s in 1.288s. Iteration 2, 1491.79 images/s in 1.287s. Iteration 3, 1493.76 images/s in 1.285s. Iteration 4, 1494.50 images/s in 1.285s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1044.44 images/s in 1.838s. Iteration 1, 1047.37 images/s in 1.833s. Iteration 2, 1046.37 images/s in 1.835s. Iteration 3, 1044.68 images/s in 1.838s. Iteration 4, 1043.91 images/s in 1.839s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 596.59 images/s in 3.218s. Iteration 1, 599.41 images/s in 3.203s. Iteration 2, 598.86 images/s in 3.206s. Iteration 3, 597.92 images/s in 3.211s. Iteration 4, 597.46 images/s in 3.214s. ``` ```python 3090 Ti theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 2307.14 images/s in 0.832s. Iteration 1, 2569.71 images/s in 0.747s. Iteration 2, 2570.15 images/s in 0.747s. Iteration 3, 2570.29 images/s in 0.747s. Iteration 4, 2569.88 images/s in 0.747s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 1578.58 images/s in 1.216s. Iteration 1, 1612.02 images/s in 1.191s. Iteration 2, 1612.37 images/s in 1.191s. Iteration 3, 1612.63 images/s in 1.191s. Iteration 4, 1612.32 images/s in 1.191s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1214.12 images/s in 1.581s. Iteration 1, 1223.07 images/s in 1.570s. Iteration 2, 1222.81 images/s in 1.570s. Iteration 3, 1221.12 images/s in 1.572s. Iteration 4, 1223.38 images/s in 1.569s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 686.56 images/s in 2.797s. Iteration 1, 693.84 images/s in 2.767s. Iteration 2, 693.32 images/s in 2.769s. Iteration 3, 691.64 images/s in 2.776s. Iteration 4, 691.63 images/s in 2.776s. ``` ```python A40 theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 1837.41 images/s in 1.045s. Iteration 1, 1892.04 images/s in 1.015s. Iteration 2, 1893.29 images/s in 1.014s. Iteration 3, 1892.99 images/s in 1.014s. Iteration 4, 1892.73 images/s in 1.014s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 1102.49 images/s in 1.742s. Iteration 1, 1115.45 images/s in 1.721s. Iteration 2, 1118.49 images/s in 1.717s. Iteration 3, 1117.32 images/s in 1.718s. Iteration 4, 1117.80 images/s in 1.718s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1155.09 images/s in 1.662s. Iteration 1, 1153.70 images/s in 1.664s. Iteration 2, 1152.89 images/s in 1.665s. Iteration 3, 1150.99 images/s in 1.668s. Iteration 4, 1150.53 images/s in 1.669s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 675.17 images/s in 2.844s. Iteration 1, 680.69 images/s in 2.821s. Iteration 2, 679.15 images/s in 2.827s. Iteration 3, 678.90 images/s in 2.828s. Iteration 4, 678.21 images/s in 2.831s. ``` ```python A100 theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 3031.31 images/s in 0.633s. Iteration 1, 4145.68 images/s in 0.463s. Iteration 2, 4143.08 images/s in 0.463s. Iteration 3, 4145.51 images/s in 0.463s. Iteration 4, 4144.79 images/s in 0.463s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 2588.47 images/s in 0.742s. Iteration 1, 2775.77 images/s in 0.692s. Iteration 2, 2771.13 images/s in 0.693s. Iteration 3, 2780.56 images/s in 0.691s. Iteration 4, 2764.96 images/s in 0.694s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1592.06 images/s in 1.206s. Iteration 1, 1690.54 images/s in 1.136s. Iteration 2, 1691.74 images/s in 1.135s. Iteration 3, 1692.93 images/s in 1.134s. Iteration 4, 1691.21 images/s in 1.135s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 1438.29 images/s in 1.335s. Iteration 1, 1491.85 images/s in 1.287s. Iteration 2, 1491.50 images/s in 1.287s. Iteration 3, 1489.87 images/s in 1.289s. Iteration 4, 1489.75 images/s in 1.289s. ``` ```python 4090 theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 3832.93 images/s in 0.501s. Iteration 1, 4286.27 images/s in 0.448s. Iteration 2, 4285.56 images/s in 0.448s. Iteration 3, 4286.17 images/s in 0.448s. Iteration 4, 4285.75 images/s in 0.448s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 2175.56 images/s in 0.883s. Iteration 1, 2292.56 images/s in 0.837s. Iteration 2, 2292.38 images/s in 0.838s. Iteration 3, 2292.68 images/s in 0.837s. Iteration 4, 2292.69 images/s in 0.837s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1890.34 images/s in 1.016s. Iteration 1, 2028.98 images/s in 0.946s. Iteration 2, 2028.92 images/s in 0.946s. Iteration 3, 2027.23 images/s in 0.947s. Iteration 4, 2023.66 images/s in 0.949s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 1099.47 images/s in 1.746s. Iteration 1, 1135.05 images/s in 1.692s. Iteration 2, 1132.25 images/s in 1.696s. Iteration 3, 1131.92 images/s in 1.696s. Iteration 4, 1132.28 images/s in 1.696s. ``` ```python 4090D theme={null} #Note: Tested with driver 550.54.14. #The performance boost over the 4090 may come from driver optimizations. >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 2941.52 images/s in 0.653s. Iteration 1, 4723.46 images/s in 0.406s. Iteration 2, 4723.64 images/s in 0.406s. Iteration 3, 4723.43 images/s in 0.406s. Iteration 4, 4723.54 images/s in 0.406s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 1948.26 images/s in 0.985s. Iteration 1, 2442.01 images/s in 0.786s. Iteration 2, 2442.06 images/s in 0.786s. Iteration 3, 2442.20 images/s in 0.786s. Iteration 4, 2442.24 images/s in 0.786s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1921.61 images/s in 0.999s. Iteration 1, 2359.63 images/s in 0.814s. Iteration 2, 2358.23 images/s in 0.814s. Iteration 3, 2358.28 images/s in 0.814s. Iteration 4, 2358.27 images/s in 0.814s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 795.41 images/s in 2.414s. Iteration 1, 835.84 images/s in 2.297s. Iteration 2, 834.46 images/s in 2.301s. Iteration 3, 832.31 images/s in 2.307s. Iteration 4, 833.71 images/s in 2.303s. ``` ```python L40 theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 3508.15 images/s in 0.547s. Iteration 1, 3792.50 images/s in 0.506s. Iteration 2, 3797.41 images/s in 0.506s. Iteration 3, 3798.82 images/s in 0.505s. Iteration 4, 3798.89 images/s in 0.505s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 1842.46 images/s in 1.042s. Iteration 1, 1940.97 images/s in 0.989s. Iteration 2, 1941.14 images/s in 0.989s. Iteration 3, 1940.94 images/s in 0.989s. Iteration 4, 1940.85 images/s in 0.989s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1521.70 images/s in 1.262s. Iteration 1, 1518.28 images/s in 1.265s. Iteration 2, 1519.53 images/s in 1.264s. Iteration 3, 1514.74 images/s in 1.268s. Iteration 4, 1507.84 images/s in 1.273s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 903.33 images/s in 2.125s. Iteration 1, 909.27 images/s in 2.112s. Iteration 2, 906.62 images/s in 2.118s. Iteration 3, 901.66 images/s in 2.129s. Iteration 4, 899.00 images/s in 2.136s. ``` ```python L20 theme={null} >>> ResNet50 Namespace(device=0, model='resnet50', precision='float16', train=False) Iteration 0, 2943.74 images/s in 0.652s. Iteration 1, 3070.92 images/s in 0.625s. Iteration 2, 3071.46 images/s in 0.625s. Iteration 3, 3071.46 images/s in 0.625s. Iteration 4, 3071.51 images/s in 0.625s. Namespace(device=0, model='resnet50', precision='float32', train=False) Iteration 0, 1708.50 images/s in 1.124s. Iteration 1, 1746.34 images/s in 1.099s. Iteration 2, 1746.79 images/s in 1.099s. Iteration 3, 1746.87 images/s in 1.099s. Iteration 4, 1746.66 images/s in 1.099s. >>> ViT Transformer Namespace(device=0, model='vit_base_patch16_224', precision='float16', train=False) Iteration 0, 1579.93 images/s in 1.215s. Iteration 1, 1589.75 images/s in 1.208s. Iteration 2, 1589.86 images/s in 1.208s. Iteration 3, 1590.05 images/s in 1.208s. Iteration 4, 1590.62 images/s in 1.207s. Namespace(device=0, model='vit_base_patch16_224', precision='float32', train=False) Iteration 0, 809.44 images/s in 2.372s. Iteration 1, 818.51 images/s in 2.346s. Iteration 2, 818.48 images/s in 2.346s. Iteration 3, 818.46 images/s in 2.346s. Iteration 4, 818.44 images/s in 2.346s. ``` ```python H800 theme={null} >>> ResNet50 Namespace(train=False, precision='float16', device=0, model='resnet50') Iteration 0, 3182.80 images/s in 0.603s. Iteration 1, 8114.82 images/s in 0.237s. Iteration 2, 8119.60 images/s in 0.236s. Iteration 3, 8116.55 images/s in 0.237s. Iteration 4, 8114.75 images/s in 0.237s. Namespace(train=False, precision='float32', device=0, model='resnet50') Iteration 0, 3409.18 images/s in 0.563s. Iteration 1, 5582.19 images/s in 0.344s. Iteration 2, 5581.61 images/s in 0.344s. Iteration 3, 5582.83 images/s in 0.344s. Iteration 4, 5585.93 images/s in 0.344s. >>> ViT Transformer Namespace(train=False, precision='float16', device=0, model='vit_base_patch16_224') Iteration 0, 3175.96 images/s in 0.605s. Iteration 1, 5818.70 images/s in 0.330s. Iteration 2, 5820.69 images/s in 0.330s. Iteration 3, 5811.54 images/s in 0.330s. Iteration 4, 5812.47 images/s in 0.330s. Namespace(train=False, precision='float32', device=0, model='vit_base_patch16_224') Iteration 0, 1012.97 images/s in 1.895s. Iteration 1, 1095.48 images/s in 1.753s. Iteration 2, 1095.56 images/s in 1.753s. Iteration 3, 1094.18 images/s in 1.755s. Iteration 4, 1092.81 images/s in 1.757s. ``` ```python H20 theme={null} >>> ResNet50 Namespace(train=False, precision='float16', device=0, model='resnet50') Iteration 0, 1098.48 images/s in 1.748s. Iteration 1, 4735.91 images/s in 0.405s. Iteration 2, 4736.08 images/s in 0.405s. Iteration 3, 4736.12 images/s in 0.405s. Iteration 4, 4736.24 images/s in 0.405s. Namespace(train=False, precision='float32', device=0, model='resnet50') Iteration 0, 1676.70 images/s in 1.145s. Iteration 1, 3191.54 images/s in 0.602s. Iteration 2, 3191.80 images/s in 0.602s. Iteration 3, 3191.68 images/s in 0.602s. Iteration 4, 3191.59 images/s in 0.602s. >>> ViT Transformer Namespace(train=False, precision='float16', device=0, model='vit_base_patch16_224') Iteration 0, 1440.53 images/s in 1.333s. Iteration 1, 2262.77 images/s in 0.849s. Iteration 2, 2262.85 images/s in 0.848s. Iteration 3, 2262.73 images/s in 0.849s. Iteration 4, 2263.06 images/s in 0.848s. Namespace(train=False, precision='float32', device=0, model='vit_base_patch16_224') Iteration 0, 592.16 images/s in 3.242s. Iteration 1, 646.19 images/s in 2.971s. Iteration 2, 644.67 images/s in 2.978s. Iteration 3, 644.38 images/s in 2.980s. Iteration 4, 643.00 images/s in 2.986s. ``` # GPU Selection Source: https://docs.gpuhub.com/gpu-selection/gpu-selection Select the GPU suits your purpose and scenario. > [!NOTE] > > For guidance on diagnosing performance bottlenecks, please refer to the [relevant documentation](/best-practices/performance#performance-tips). > Note that Ampere architecture cards (e.g., 3060, 3090, 3080 Ti) require CUDA 11.1 or higher, while Titan Xp, 1080 Ti, 2080 Ti, P40, and V100 have no such requirement. > Use a higher - version framework. On the GPUhub platform, CPU and memory are allocated proportionally to the number of rented GPUs. The CPU and memory figures in the compute power market represent the amount allocated per GPU. For example, if you rent two GPUs, the CPU and memory will be doubled. Also, note that GPUs are not shared; each instance has exclusive access to its allocated GPU. ## CPU Selection CPUs are crucial! Although CPUs don't directly participate in deep - learning model computations, they must provide data - processing capabilities exceeding the model - training throughput. For instance, an 8 - GPU NVIDIA V100 DGX server achieves 8,000 images/second training throughput with ResNet - 50 ImageNet classification. However, a 16 - GPU V100 DGX2 server fails to double this throughput, indicating the DGX2's CPU has become a performance bottleneck. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/cpu-selection.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=5f9788f1bfd1e6af79e21566cbdf8ef0) We typically allocate a set number of CPU logical cores per GPU. Ideally, model - computation throughput rises linearly with more GPUs, and the CPU - core allocation for one GPU can scale up linearly for multiple GPUs. GPUhub's instances offer various CPU - allocation specs. Each GPU should have at least 4 - 8 CPU cores for multi - threaded, asynchronous data reading. Adding more cores usually brings little gain, as data - reading bottlenecks often stem from Python's multi - process switching and data - communication overhead (e.g., with PyTorch DataLoader). To save costs and overcome this bottleneck, try NVIDIA DALI, a C++ - and CUDA - based data - reading acceleration library, on GPUhub. In our tests, a single - core CPU instance outperformed an eight - core Python - based one in data reading, effectively supporting model training. GPUs in GPUhub machines are paired with high - performance CPUs, such as: | GPU Model | CPU Models | | - | - | | H20-NVLink | AMD EPYC 9K84 | | 4090 | Xeon(R) Gold 6430 | | A100 | AMD EPYC 7763 | | 4090 | Xeon(R) Platinum 8352V, 8358P, and Gold 6430 | | 4090D | Xeon(R) Platinum 8474C and 8481C | | 4090/4090D | AMD EPYC 9654 and 9754 | | L20/H20-NVLink | Xeon(R) Platinum 8457C | > [!TIP] > > Server CPUs generally have lower clock speeds than desktop CPUs but more cores. When switching from a desktop CPU to a server CPU, you must fully utilize the multi-core performance; otherwise, you can't harness the server CPU's capabilities. Learn how to utilize this by checking the [relevant documentation](/best-practices/performance#performance-tips). ## GPU Selection The platform offers a variety of GPU models, which can be categorized into five main architectures: * **NVIDIA Pascal Architecture GPUs:** Such as TitanXp and GTX 10 series. These GPUs lack low - precision hardware acceleration but offer moderate single - precision compute power. Their affordability makes them ideal for training small models (e.g., Cifar10) or debugging model code. * **NVIDIA Volta/Turing Architecture GPUs:** Such as GTX 20 series and Tesla V100. These GPUs feature TensorCores for low - precision (int8/float16) compute acceleration. However, their single - precision compute power hasn't improved much over the previous generation. We recommend enabling mixed - precision training in deep learning frameworks to accelerate model computation. Mixed - precision training can typically provide over twice the training speedup compared to single - precision training. * **NVIDIA Ampere Architecture GPUs:** Such as GTX 30 series and Tesla A40/A100. These GPUs have third - generation TensorCores that support the TensorFloat32 format, which can directly accelerate single - precision training (enabled by default in PyTorch). However, we still suggest using the ultra - high - compute - power float16 half - precision training for models to achieve more significant performance improvements over previous - generation GPUs. * **Cambricon MLU 200 Series Accelerator Cards:** These cards don't support model training. For model inference, computations need to be quantized to int8. Also, a deep learning framework adapted to Cambricon MLU must be installed. * **Huawei Ascend Series Accelerator Cards:** These support both model training and inference. However, the MindSpore framework needs to be installed for computations. Choosing a GPU model isn't difficult. For common deep learning models, the performance can be roughly estimated based on the GPU's compute power at the corresponding precision. The GPUhub platform labels and ranks the compute power of each GPU model, making it convenient for users to choose the right GPU. The number of GPUs to select depends on the training task. Generally, a model should be trained within 24 hours to allow for iterative improvements the next day. Here are some suggestions for selecting multiple GPUs: * **1 GPU:** Suitable for training tasks with smaller datasets, such as Pascal VOC. * **2 GPUs:** Allows running two sets of parameters or increasing the Batchsize compared to a single GPU. * **4 GPUs:** Suitable for training tasks with medium - sized datasets, such as MS COCO. * **8 GPUs:** A classic and versatile configuration suitable for various training tasks and convenient for reproducing paper results. * **More GPUs:** For training large - parameter models, extensive hyperparameter tuning, or ultra - fast model training. ## RAM Selection Generally, sufficient memory doesn't impact performance. Yet, GPUhub instances have stricter memory limits than local computers (which use hard - disk virtual memory when memory is low, just slowing down speed). For example, if an instance has 64GB of memory and the program needs 64.1GB during training, the system will kill the process at the moment of exceeding the limit, interrupting the program. So, if you need more memory, choose a host with more memory or rent multiple - GPU instances. If unsure about memory usage, monitor it in the instance monitor. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/monitor-instance.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=4a05e44f46be770865922bf24ace48f0) ## Introduction to GPU Models | Model | VRAM | Single Precision (FP32) | Half Precision (FP16) | Details | Description | | - | - | - | - | - | - | | Tesla P40 | 24GB | 11.76 T | 11.76 T | [View](https://www.techpowerup.com/gpu-specs/tesla-p40.c2878) | An older Pascal - based GPU, great for algorithms needing large VRAM before CUDA 11.x. | | TITAN Xp | 12GB | 12.15 T | 12.15 T | [View](https://www.techpowerup.com/gpu-specs/titan-xp.c2948) | An older Pascal - based GPU, suitable for beginners. | | 1080 Ti | 11GB | 11.34 T | 11.34 T | [View](https://www.techpowerup.com/gpu-specs/geforce-gtx-1080-ti.c2877) | A card from the same era as TITAN Xp, good for beginners but with sometimes awkward 11GB VRAM. | | 2080Ti | 11GB | 13.45 T | 53.8 T | [View](https://www.techpowerup.com/gpu-specs/geforce-rtx-2080-ti.c3305) | A Turing - based GPU with good performance and high cost - effectiveness for mixed - precision computing. | | V100 | 16/32GB | 15.7 T | 125 T | [View](https://www.techpowerup.com/gpu-specs/tesla-v100s-pcie-32-gb.c3467) | The previous gen's top professional compute card, with high half - precision performance for mixed - precision computing. | | 3060 | 12GB | 12.74 T | About 24T | [View](https://www.techpowerup.com/gpu-specs/geforce-rtx-3060.c3682) | A good choice if 1080 Ti's VRAM is insufficient, suitable for beginners. Requires CUDA 11.x. | | A4000 | 16GB | 19.17 T | About 76T | [View](https://www.techpowerup.com/gpu-specs/rtx-a4000.c3756) | Balanced in terms of VRAM and compute power, suitable for intermediate use. Requires CUDA 11.x. | | 3080Ti | 12GB | 34.10 T | About 70T | [View](https://www.techpowerup.com/gpu-specs/geforce-rtx-3080-ti.c3735) | High - performance, suitable if VRAM requirements are not high. Requires CUDA 11.x. | | A5000 | 24GB | 27.77T | About 117T | [View](https://www.techpowerup.com/gpu-specs/rtx-a5000.c3748) | High - performance, suitable if 3080Ti's VRAM is insufficient, with high half - precision compute power for mixed - precision. Requires CUDA 11.x. | | 3090 | 24GB | 35.58 T | About 71T | [View](https://www.techpowerup.com/gpu-specs/geforce-rtx-3090.c3622) | Can be seen as the expanded - VRAM version of 3080Ti, with strong performance and cost - effectiveness. Requires CUDA 11.x. | | A40 | 48GB | 37.42 T | 149.7 T | [View](https://www.techpowerup.com/gpu-specs/a40-pcie.c3700) | Can be seen as the expanded - VRAM version of 3090, choose based on VRAM needs. Requires CUDA 11.x. | | A100 SXM4 | 40/80GB | 19.5 T | 312 T | [View](https://www.techpowerup.com/gpu-specs/a100-sxm4-80-gb.c3746) | The new generation's top professional compute card, expensive but with no other drawbacks. Large VRAM and very suitable for half - precision computing, with high multi - GPU parallel acceleration ratio due to NVLink. Requires CUDA 11.x. | | 4090 | 24G | 82.58 T | 165.2 T | [View](https://www.techpowerup.com/gpu-specs/geforce-rtx-4090.c3889) | The new generation's top gaming card, with high cost - effectiveness despite smaller VRAM and lower multi - GPU parallel efficiency. | # Introduction Source: https://docs.gpuhub.com/introduction Welcome to the GPUhub documentation. This is the go-to resource for researchers and developers working with GPU-accelerated computing. Get clear, accurate, step-by-step guides to train, deploy, and optimize faster. ```python theme={null} quote = '"Do. Or do not. There is no try." — Yoda' print(quote) ``` ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/docs-banner.jpg?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=f9ae07bb4e5a42c20e4b8d557ab3103a) ## Cloud GPU Instance ### Create Your Container Instance Create a stable, reliable, and reasonably priced cloud container instance suitable for your use. > **[Quick Start](/quickstart)** > > Quickly register and create a Cloud Container Instance by selecting the billing model, host, GPU count, and image. > **[GPU Selection](/gpu-selection/gpu-selection)** > > Select the right GPU for your tasks. The platform provides proportional CPU and memory resources based on the number of GPUs selected. > **[Keep Instance Active in Background](/container-instance/run-in-background)** > > Ensure your programs run continuously in the background when using SSH or SSH-based tools by running commands in daemon mode. > **[Read Data Retention Policies](/data/overview)** > > Understand the data retention rules to avoid data loss, especially during instance shutdowns. ### Data Transmission & Storage We are offering multiple flexible methods for data transfer. It supports various tools and techniques, including JupyterLab, scp commands, and graphical interfaces like FileZilla or XShell, providing users with convenient options for uploading and downloading data. > **[Data Disk](/data/local-data-disk)** > > Ideal for intensive tasks, offering flexible and cost-effective storage solutions. > **[File Storage](/data/file-storage)** > > Perfect for long-term storage and backup, allowing you to manage data without running an instance. > **[Upload Data](/data/upload-data)** > > Use various tools like JupyterLab, scp commands, or graphical interfaces for efficient data uploads. > **[Download Data](/data/download-data)** > > Easily retrieve your data using file transfer tools, terminal commands, or intuitive interfaces. ### Enviroment Configuration The platform's images come with many frameworks and versions. If they don't meet your needs, see how to configure other versions. > **[Enviroment Configuration](/environment/overview)** > > Customize your environment if the pre-installed frameworks and versions don't meet your needs. > **[Image](/environment/image)** > > Save and reuse custom environments by saving images, or share them with other users. ### SSH & Ports Manage secure instance access and external connectivity with SSH and customizable ports. > **[SSH](/best-practices/ssh-tunnel)** > > Securely access your instance via SSH for remote management, file transfers, debugging, and running commands directly in the container environment. > **[Open Ports](container-instance/open-ports)** > > Expose custom ports to make your applications accessible over the internet, enabling web services, APIs, dashboards, and other external integrations. ## Elastic Deployment Effortlessly deploy and manage scalable GPU-accelerated applications with intelligent scheduling, rolling updates, and persistent storage — designed for stable, long-running AI workloads. > **[Get Started with Elastic Deployment](/elastic-deployment/elastic-deployment)** > > Learn how to create ReplicaSets, Jobs, or single containers with flexible resource constraints and automatic host matching. > **[Why Not Pure Serverless?](/elastic-deployment/why-not-serverless)** > > Understand why GPUhub chooses elastic containers over traditional serverless for better stability, lower latency, and real-world AI training/inference needs. ## AI Gateway AI Gateway gives you one place to access GPUhub-hosted open-source models and route requests to closed-source model providers. It supports OpenAI-compatible, Anthropic-compatible, and Gemini-compatible endpoints, so you can use familiar SDKs and tools while managing usage and billing from the GPUhub console. > **[AI Gateway Overview](/ai-gateway/ai-gateway)** > > Learn how AI Gateway works, including supported model types, service plans, and billing formulas. > **[LLMs](/ai-gateway/llms/claude-opus-4-8)** > > Browse available LLMs such as Claude, GPT, Gemini, GLM, Qwen, DeepSeek, and MiniMax. > **[Codex](/ai-gateway/ides-agents/codex)** > > Configure Codex to use AI Gateway through an OpenAI-compatible endpoint. > **[Cherry Studio](/ai-gateway/ides-agents/cherry-studio)** > > Connect Cherry Studio to AI Gateway providers for Claude, GPT, Gemini, and OpenAI-compatible models. # Coupons & Vouchers Source: https://docs.gpuhub.com/promotions/coupons-vouchers How to claim and use coupons and vouchers on GPUhub, including eligibility criteria, usage modes, and maximum discount limits. > [!CAUTION] > > Accounts registered with temporary or disposable emails for the purpose of obtaining vouchers/discounts will be immediately and permanently banned without warning. ## Coupons - Discount Coupons ### Claiming 1. **You have to logged in on GPUhub Console first.** 2. The entry point is on the right side of the homepage → Claim Coupons. When claiming coupons, please confirm the scope of use for the coupons, which generally includes: * applicable to all products, * available in certain regions, * and available for certain products. ![](https://mintcdn.com/gpuhub/3UNS_J6nTiNHq7Ex/images/claim-coupon.png?fit=max\&auto=format\&n=3UNS_J6nTiNHq7Ex\&q=85\&s=415e4384a9c50db0ecb480d025046333) Choose the coupons that are suitable for you. ### Coupon Usage Rules > [!WARNING] > > Coupons have a daily discount cap. for long-running, multi-GPU workloads, using coupons is not a practical approach. 1. **All discount coupons apply only to one-time subscription orders** (daily, weekly, or monthly) and are **not valid for Pay-As-You-Go (PAYG) usage**. 2. Coupons do **not apply to automatic renewals**. However, users may purchase subscriptions covering multiple days, weeks, or months within a single one-time order. 3. **Each coupon has** its own daily discount (Usually USD10-30, regardless of single or multi-GPU usage.) **cap and maximum discount duration (measured in days)**. The discount will stop applying once either limit is reached. ### Eligible Billing Modes 1. Coupons can be used only with subscription plans, including: * New subscription purchases * Switching from PAYG to Subscription mode * Manual renewal via a new one-time subscription order 2. If you are currently on PAYG mode, you may switch to Subscription mode to apply a coupon, and switch back to PAYG before the subscription period ends. ![](https://mintcdn.com/gpuhub/fQRqLbPnU3r_cpoM/images/use-coupon.png?fit=max\&auto=format\&n=fQRqLbPnU3r_cpoM\&q=85\&s=f1b182b31f3909bc065ffd5259482f1f) ## Vouchers - Credit Vouchers 1. Vouchers have specific denominations 2. Vouchers can be used to offset charges on eligible service bills. 3. **During both pay-as-you-go usage and subscription billing, voucher balances will be applied with priority where applicable.** GPUhub reserves the right of final interpretation of all voucher rules. ### Referral Bonus Referral bonus are issued to users who refer new users to GPUhub. The new users can use the vouchers to offset the amount on their service bills. ![](https://mintcdn.com/gpuhub/YzcfwLO7yCC9fcHr/images/referral-bonus.png?fit=max\&auto=format\&n=YzcfwLO7yCC9fcHr\&q=85\&s=57aa0e213e0eb8590129c9ed4fc5c117) **1. Copy Your Unique Referral Link** Go to the “Your Referral Link” section and click the purple **Copy** button (or manually copy the full URL that contains your personal referral code). **2. Share the Link with Your Friends** **Share the link** to your friends via WhatsApp, Telegram, WeChat, Discord, SMS, email, or any other platform. ⚠️ They must register using your exact link; otherwise, the referral will not be tracked and you will not receive any reward. **3. Your Friend Completes the Requirement** Signs up through your link, makes their first deposit of \$20 or more (or equivalent in other currencies) **4. You Get Rewarded Instantly** Once the above conditions are met, you will **automatically receive** \$6 (issued as a Voucher/Bonus) for that referral. ### Redeem Vouchers If you're lucky enough to grab one of our redeem codes, please redeem it immediately in the Payments section of the console. ```python theme={null} #An example of code A6I0Y54Q1L ``` Redeem it in the console for an instant balance. ![](https://mintcdn.com/gpuhub/hxKKa9z0PeX_GB3Y/images/redeem-vouchers.png?fit=max\&auto=format\&n=hxKKa9z0PeX_GB3Y\&q=85\&s=70f30e3e8fded3d9976437f55035845b) # Membership Source: https://docs.gpuhub.com/promotions/membership Upon registration, users will receive 30 days membership by default. ## Membership Levels Membership levels are determined by the growth points accumulated within the last 3 months. Once the growth points within 3 months meet the criteria, an automatic upgrade or downgrade will be triggered. The rules are as follows: | Level | Regular User | Membership User | | - | - | - | | **Membership Conditions (Non-Student)** | Growth points in the last 3 months >= 0 | Growth points in the last 3 months >= 100 | | **Membership Conditions (Student)** | -- | Students remain as Membership Users during the certification period | ## Membership Growth Points > [!NOTE] > > Growth Points are not intended for consumption. They merely serve to record the level of user activity. * Earn 1 growth point per \$1 spent on recharges. * Growth points are deducted for refunds. # Student Verification Source: https://docs.gpuhub.com/promotions/student-verification In support of the advancement of science and technology education, we offer preferential policies to current students of colleges and universities. Student certification grants access to a fast-track membership upgrade, allowing you to enjoy membership discounts. Each certification is valid for one year, after which recertification is required. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/student-verification.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=41cb56c16b5451389b80c14944786c4b) If you are unable to complete the certification on the website, please contact our technical support or customer service for assistance. # Quickstart Source: https://docs.gpuhub.com/quickstart Start launching your cloud container instance in under 5 minutes > [!NOTE] > > In GPUhub instances, data (including environments) is saved even after shutdown. > You needn't reconfigure or reupload data upon restart. However, instances will be released if shut down continuously for 15 days. > For details, see [Instance Data Retention Policy](/data/overview). ## Before You Start > [!TIP] > > Please read this carefully before using GPUHub. These are the essential things every user needs to know before getting started. **Please review these 10 points before using GPUHub:** 1. [Storage](/data/local-data-disk) — System Disk, Data Disk, and File Storage serve different purposes. Images do not include Data Disk data. 2. [Billing](/billing-recharge/billing#persistent-storage-services) — Stopping an instance stops GPU charges, but storage charges may continue. 3. [Data](/data/overview) — Back up important data before releasing an instance. Deleted data may not be recoverable. 4. [Access](/container-instance/overview) — GPUHub provides a container environment, not host or Docker daemon access. 5. [Images](/container-instance/save-image#custom-image) — Custom Docker images and private registries are not supported. 6. [Ports](/container-instance/open-ports) — Each instance supports 2 public ports only. Additional ports cannot be added. 7. [Network](/troubleshooting/networks) — Public Internet performance depends on routing, ISPs, and destination services. End-to-end performance is not guaranteed. 8. [Elastic Deployment](/elastic-deployment/elastic-deployment-best) — Elastic Deployment has no dedicated Data Disk. Use images or File Storage for persistent data. 9. [Payments](/billing-recharge/recharge) — Automatic payments and cryptocurrency payments, including USDT, are not supported. 10. [Refunds](/terms/terms-of-service#refund-policy) — GPUHub is prepaid. Please review the billing and refund policies before adding funds. ## Create an Instance After registration, enter the console. Under My Instances, click "Launch Instance". ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/instances.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=88088cf04ca7faac2b103737f9109ef4) On the instance creating page, select billing method, region, GPU type and count. Then choose a suitable idle host and image (with basic Deep Learning frameworks or community images) to create the instance. ![](https://mintcdn.com/gpuhub/yLmjMPcqL-OhC9CD/images/create-instance.png?fit=max\&auto=format\&n=yLmjMPcqL-OhC9CD\&q=85\&s=c71f469cda72ef6295b5bf881bb2deb6) > [!TIP] > > For larger data storage, check the expandable disk size. > Refer to the [Instance Overview](container-instance/overview) for the data disk path. After creation, wait for startup. The main operation entry points are in the item. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/instance-operate.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=bcdc9201173a783c79f0a908860b98e6) > [!WARNING] > > Note that billing starts when the instance status shows 'Running'. > Shut it down promptly to stop billing when not in use. > For billing rules, see [Billing Description](recharge-pricing/billing). ## Upload Data Once the instance is running, find the "JupyterLab" shortcut tool and click to open it. Locate the upload button in the screenshot to upload data. For folder uploads or advanced methods, refer to the [Data Upload](data/upload-data) documentation. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/upload-data.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=3452241870a7aa19088bb1e8745daa53) ## Terminal Training Open the terminal in the JupyterLab page. For remote development with other IDEs, refer to VSCode (recommended) and PyCharm. ![](https://mintcdn.com/gpuhub/r1V0ko0l9sh4RwWM/images/open-terminal.png?fit=max\&auto=format\&n=r1V0ko0l9sh4RwWM\&q=85\&s=dc53f3e623b721f7aeb93881e0d3ca5e) Execute Python commands in the terminal to complete training. ![](https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/start-training.png?fit=max\&auto=format\&n=hau6BtaiLdxackoK\&q=85\&s=d6fdf6fa5661b8ff5475f13d7d19648e) ## Advanced Learning > **[GPU Selection](/gpu-selection/gpu-selection)** > > Select GPU type and count > **[Environment Configration](/environment/overview)** > > Config your development environment > **[Upload Data](/data/upload-data)** > > Upload data with FileZilla > Securely access your instance via SSH > > [Open](/best-practices/ssh-tunnel) > **[Open Ports](container-instance/open-ports)** > > Expose custom ports to make your applications accessible > **[VSCode](/best-practices/vscode)** > > Remote development with VSCode > **[PyCharm](/best-practices/pycharm)** > > Remote development with PyCharm > **[Run a Daemon Process](/container-instance/run-in-background)** > > Keep alive with a daemon process > **[Linux Basics](/best-practices/linux-basics)** > > Basic Linux commands > **[FAQ](/faqs)** > > Frequently asked questions # Anti-Mining Policy Source: https://docs.gpuhub.com/terms/anti-mining-agreement Developers, let not the lure of personal gain blind you to the greater good. Act with wisdom and restraint. > GPUhub PTE. LTD. > > Last modified: March 15, 2025 *** GPUhub is primarily dedicated to serving educational and scientific research communities by providing powerful computing resources to facilitate learning, innovation, and discovery. Given the intensive nature of cryptocurrency mining activities, which can significantly strain computational infrastructure and detract from our mission to support academic and research endeavors, we have established this policy to prohibit the use of GPUhub resources for cryptocurrency mining. ## 1. Definitions * Mining Activities: Refers to the use of computational resources to validate blockchain transactions and create new cryptocurrency units, including but not limited to Bitcoin, Ethereum, and ALEO etc. * Computational Resources: Includes all processing, memory, storage, and network resources provided by GPUhub. ## 2. Prohibitions * Users must not utilize any virtual machines, servers, container instances, or other forms of computational resources from GPUhub for mining activities. * Users must ensure their resources do not contain programs, scripts, or software specifically designed for or capable of mining. ## 3. Monitoring and Account Management * GPUhub reserves the right to monitor resource usage patterns to detect potential mining activities. * Upon detection of suspected mining activities, GPUhub will immediately suspend related services for investigation. * Users will be notified within 24 hours to explain any detected anomalies. ## 4. Responsibilities and Penalties * Violation of this policy constitutes a breach of contract. * GPUhub may take actions including but not limited to deleting content, restricting account privileges, permanent account suspension, and temporary balance freezes. * A penalty fee equivalent to the total consumption amount of the instance used for mining will be charged, which may be deducted from the user's remaining balance. * In cases of suspected criminal activity, GPUhub reserves the right to preserve digital content and transfer it to relevant authorities. ## 5. Compensation for Losses * Users must compensate GPUhub for all direct and indirect losses incurred due to violations, including but not limited to commercial reputation damage, governance costs, third-party compensation, and legal fees. ## 6. Legal Compliance * Users acknowledge that GPUhub does not guarantee the legality of their activities and users must independently bear all legal responsibilities arising from illegal mining. ## 7. Policy Interpretation and Updates * GPUhub retains the final interpretation rights of this policy. * This policy may be unilaterally modified by GPUhub based on legal, regulatory, and operational needs, with updates announced in advance. ## 8. Dispute Resolution * Disputes shall be resolved through negotiation, with unresolved issues subject to litigation in the courts with jurisdiction over GPUhub's place of business. ## 9. Governing Law * This policy is governed by the laws of the jurisdiction where GPUhub operates. By using GPUhub's services, users acknowledge and agree to abide by this Anti-Cryptocurrency Mining Policy. GPUhub thanks users for their cooperation in maintaining a fair and efficient computing environment for all members of the educational and research communities. # Cloud Disk Storage License & Service Agreement Source: https://docs.gpuhub.com/terms/cloud-disk-agreement By continuing to use the GPUhub platform and accessing the cloud disk/storage service, you acknowledge that you have read, understood, and agree to be bound by the terms of this agreement. > GPUhub PTE. LTD. > > Last modified: March 15, 2025 *** To use the GPUhub Cloud Disk storage products and services (hereinafter collectively referred to as "this service"), you must read and comply with the GPUhub Cloud Disk Storage License and Service Agreement (hereinafter referred to as "this agreement") and the GPUhub Service Agreement. Please carefully read and fully understand the content of each clause, especially the clauses that exempt or limit GPUhub's liability, restrict user rights, and stipulate the methods for resolving disputes and judicial jurisdiction (such as the relevant provisions in Article 15), as well as separate agreements for enabling or using certain services. Clauses that restrict liability, exempt from liability, or involve significant rights and interests may be highlighted in bold, underlined, or other forms to draw your attention. Unless you have fully read, fully understood, and accepted all the terms of this agreement, you have no right to download, install, or use this service and/or related services. Your actions of clicking "Agree," "Next," or downloading, installing, using, logging in, or any other express or implied indication of acceptance of this agreement shall be deemed as your acknowledgment of having read and agreed to the binding nature of this agreement. This agreement shall have legal effect between you and GPUhub and become a legally binding document for both parties. If you do not have full civil capacity due to age, intelligence, or other factors, please read and judge whether to agree to this agreement under the accompaniment of a legal guardian (hereinafter referred to as "guardian"). If you are a user outside Mainland China, your conclusion or performance of this agreement and the use of this service shall also comply with the laws of your country or region of affiliation or location. ## I. Scope of Agreement 1.1 This agreement is between you and GPUhub regarding the expansion, reduction, use of this service, and the terms related to this service. 1.2 The content of this agreement includes, but is not limited to, the following agreements, rules, and standards related to this service and/or this service, as well as any additional agreements, rules, and standards that GPUhub may continuously publish regarding this service and/or this service. Once officially published, such content shall become an integral part of this agreement, forming a unified whole, and you shall also comply with it. ## II. About This Service and This Service 2.1 This service refers to the GPUhub Cloud Disk storage software developed by GPUhub and authorized for users to log in and use in accordance with this agreement and other agreements and rules of GPUhub. 2.2 You may be able to use this service through terminals such as computers and mobile phones in the form of client software, subject to what GPUhub provides. At the same time, GPUhub will continuously enrich the terminals and forms through which you can use this service. When you use this service, you should select the version of this service that matches your terminal and system; otherwise, you may not be able to use this service normally. 2.3 GPUhub grants you a personal, non-transferable, and non-exclusive license to use this service within the scope and manner limited by this agreement and other agreements and rules of GPUhub. * 2.3.1 You may download, install, use, and log in to this service on a single terminal device for non-commercial purposes. * 2.3.2 You may create one backup copy of this service, which must contain all the copyright information included in the original software. * 2.3.3 All other rights not expressly authorized in this article and other clauses of this agreement are reserved by GPUhub. If you exercise these rights, you must obtain written permission from GPUhub. If GPUhub does not exercise any of the aforementioned rights, it does not constitute a waiver of such rights. 2.4 You understand and agree that, in order to provide you with effective services, this service will utilize the processor and bandwidth resources of your terminal device. During the use of this service, data traffic charges may be incurred, and you should inquire with your service provider about the relevant rates and bear such costs yourself. 2.5 You acknowledge and agree that the software may offer different levels of users additional network storage space for free when they activate other related services of GPUhub. For specific details, please refer to the relevant rules published by GPUhub. 2.6 For non-paying users, GPUhub will provide a certain amount of storage capacity for free. Users may purchase additional storage capacity and other products, and the capacity will take effect immediately after purchase or downgrade. If you enable the auto-renewal feature, you are responsible for ensuring that your account balance is sufficient and that all fees are paid on time. If we are unable to successfully collect the due fees from your payment account, we reserve the right to revoke or restrict your access to the content you have stored. If you cancel the purchased capacity service, your storage space will be reduced to the free capacity. During this period, if you have used storage space exceeding the free capacity, you may not be able to create, upload, or edit any files or use certain functions until you have reduced your storage space. Thirty days after you cancel the purchased capacity service, GPUhub reserves the right to delete any expired or over-capacity files and content saved by the user. 2.7 Users agree to use the services in accordance with the usage period, file restrictions, size limitations, and other relevant rules published by GPUhub regarding storage and other services. If the usage or storage period expires or no longer complies with the relevant rules, GPUhub reserves the right to delete any expired, over-capacity, or non-compliant files and content saved by the user. If any loss is caused due to the user's failure to actively transfer the files before they are deleted, it is unrelated to GPUhub, and the user shall bear all responsibilities. At the same time, the user agrees that GPUhub may unilaterally change the aforementioned rules and other rules of this service without further notice to the user. 2.8 Users may enjoy a wide range of services provided by GPUhub by purchasing value-added services. GPUhub may modify and change the charging standards and methods for value-added services according to the overall planning of such services. Any modifications or changes will be displayed on the relevant service pages. If you need to obtain or use relevant value-added services, please carefully read and fully understand the information regarding the charging standards and methods at that time. Users may also go to the designated page to cancel the relevant value-added services on their own. Once the cancellation is successful, you will only be able to use the free services provided by GPUhub. Therefore, GPUhub reminds users to handle the content exceeding the storage capacity according to the relevant rules after canceling the value-added services of this service. Otherwise, any resulting losses will be borne by the user. 2.9 You understand and agree that GPUhub may update or adjust this service and/or the content of this service as needed, including but not limited to: (1) GPUhub has the right to unilaterally modify or change the provided paid services, charging standards, charging methods, service fees, and service terms as needed. GPUhub may now or in the future start charging certain fees for some services. If users refuse to pay these fees, they will not be able to continue using the relevant services after the charge begins. GPUhub will make the greatest effort to notify users of any modifications or changes through reasonable means. (2) You understand and agree that GPUhub may adjust the service space capacity (including both free and paid capacity) for users according to its own business development needs. To fully protect the legitimate rights and interests of users, notices of capacity adjustments will be displayed at least seven days in advance. If there is an over-capacity use of this service, users should, within the reasonable period given by GPUhub, continue to use this service by paying or transferring the stored content on their own. If users fail to handle the over-capacity storage space in time, GPUhub has the right to freeze or delete all content under the account, and any resulting losses will be borne by the user. ## III. Service Account 3.1 Users are obligated to properly keep their accounts and passwords and to use their accounts and passwords correctly and securely. Users shall bear the legal liabilities arising from any damage to the civil rights of users and others due to the loss of account passwords, account theft, or other circumstances resulting from the user's failure to fulfill the aforementioned obligations. If a user discovers that their account has been illegally used by others or there are security vulnerabilities, they should immediately notify GPUhub. 3.2 The ownership of the account belongs to GPUhub. After you complete the registration and login procedures, you may use the corresponding account, and only you may use the account. You may not gift, lend, rent, transfer, or sell the user account or otherwise permit non-you to use the service account. Non-you may not use your service account through gifts, inheritance, leasing, assignment, or any other means. ## IV. Acquisition of Software 4.1 You may directly obtain this service from the official website of GPUhub, official application distribution platforms, and third-party websites and application distribution platforms authorized by GPUhub, or other channels authorized by GPUhub. 4.2 If you obtain this service or an installation program with the same name as this service from an unauthorized third party, GPUhub cannot guarantee that the software will function properly and will not be responsible for any losses caused to you as a result. ## V. Installation and Uninstallation of Software 5.1 GPUhub may develop different software versions for different terminals and systems. You should select and install the appropriate version based on your actual 5.2 After downloading the installation program, you need to install it correctly according to the steps prompted by the program. 5.3 To provide higher quality and more secure services, GPUhub may recommend that you install other software during the installation of this service. You may choose to install or not install it. 5.4 Due to business strategy arrangements or adjustments, there may be differences in the specific service content available to users in different regions for this service, subject to what GPUhub actually provides. 5.5 If you no longer need to use this service or need to install a new version of the software, you may uninstall it on your own. If you are willing to help GPUhub improve its products and services, please inform us of the reason for uninstallation. ## VI. Software Updates 6.1 To enhance user experience and improve service content, GPUhub may continuously strive to develop new services and provide software updates from time to time. 6.2 To improve user experience, enhance service security, and ensure consistency of functions, GPUhub has the right to update this service without specifically notifying you, or to change some of the functional effects and service content of this service. 6.3 After the release of a new version of this service, the old version of the software may no longer be usable. GPUhub does not guarantee the continued availability of the old version of the service, nor does it guarantee continued customer service and maintenance support for the old version. Please check and download the latest version at any time. ## VII. Protection of User Personal Information 7.1 Protecting user personal information is a fundamental principle of GPUhub. GPUhub will collect, use, store, and share your personal information in accordance with this agreement and the [GPUhub Terms of Service](/terms/terms-of-service). For any content not explicitly stipulated in this agreement regarding the protection of personal information, the content of the [GPUhub Terms of Service](/terms/terms-of-service) shall prevail. 7.2 During the process of registering an account or using this service, you may be required to fill in some necessary information. If there are special provisions in national laws and regulations (the term "laws and regulations" in this agreement refers to the current effective laws, administrative regulations, judicial interpretations, local regulations, local rules, departmental regulations, and other normative documents in the region or country where the user is located, as well as any modifications and supplements to these laws and regulations from time to time, and relevant policy provisions, etc., hereinafter the same), you are required to fill in real identity information (including but not limited to mobile phone numbers, etc.). If the information you fill in is incomplete or untrue, you may not be able to use this service or may be restricted in its use. 7.3 You acknowledge and agree that certain functions of this service may share your information with third parties. When sharing your personal information with third parties, it will be done with your authorization and consent. The shared personal information will be de-identified or such that the third party cannot identify the natural person subject of the information, unless we share necessary personal information with our affiliates, which is subject to the purposes declared in this agreement. If the purpose for which the affiliate or third party uses the information exceeds the original scope of authorization, they will need to obtain your consent again. Generally, you may view and modify the information you have submitted in accordance with the relevant product rules, but for security and identity verification reasons (such as account recovery, etc.), you may not be able to modify the initial registration information and other verification information provided at the time of registration. 7.4 GPUhub will employ various security technologies and procedures to establish a comprehensive management system to protect your personal information from unauthorized access, use, or disclosure. 7.5 GPUhub will not transfer or disclose your personal information to any third party, unless: * (1) Required by relevant laws and regulations or by judicial or administrative authorities; * (2) In connection with a merger, division, acquisition, or asset transfer; * (3) Necessary to provide the services you have requested; * (4) In accordance with the GPUhub Privacy Policy or other relevant agreement provisions that permit the transfer or disclosure of information to third parties. 7.6 GPUhub places great importance on the protection of minors' personal information. If you do not have full civil capacity, you should obtain the consent of your guardian before using this service. ## VIII. User Behavior Standards 8.1 Prohibited User Actions When using this service and/or this service, you must comply with relevant laws and regulations, this agreement, and the rules and standards published by GPUhub for this service. You may not engage in, nor provide facilitation for, any of the following actions: 8.1.1 Actions Prohibited by Laws and Regulations When using this service, you must abide by the laws and regulations and may not create, copy, publish, or disseminate information containing the following content, nor provide facilitation for such actions: * (1) Opposing the basic principles established by the Constitution. * (2) Endangering national security, leaking state secrets, subverting state power, or undermining national unity. * (3) Damaging the honor and interests of the nation. * (4) Inciting ethnic hatred or discrimination, or undermining ethnic solidarity. * (5) Undermining national religious policies, promoting cults, or superstitions. * (6) Spreading rumors, disrupting social order, or undermining social stability. * (7) Disseminating obscenity, pornography, gambling, violence, murder, terrorism, or inciting crime. * (8) Insulting or defaming others, or infringing upon the lawful rights and interests of others. * (9) Violating the "seven bottom lines" requirements of the laws and regulations, the socialist system, national interests, citizens' lawful rights and interests, social public order, moral standards, and information authenticity. * (10) Other actions prohibited by laws and regulations, GPUhub agreements, or rules. 8.1.2 Software Usage Unless permitted by laws and regulations or in writing by GPUhub, you may not engage in the following actions: * (1) Deleting copyright information from this service and its copies. * (2) Reverse engineering, decompiling, or disassembling this service, or otherwise attempting to discover the source code of this service. * (3) Using, renting, lending, copying, modifying, linking, reprinting, compiling, publishing, or establishing mirror sites of content owned by GPUhub with intellectual property rights. * (4) Copying, modifying, adding to, deleting, or creating derivative works from data released to any terminal memory during the operation of this service, interaction data between the client and server during the operation of this service, or system data necessary for the operation of this service, in the form of using plugins, extensions, or unauthorized third-party tools/services to access this service and related systems. * (5) Modifying or forging instructions and data during the operation of software to add, delete, or alter the functionality or effects of the software, or operating or disseminating to the public software or methods used for such purposes, whether for commercial purposes or not. * (6) Using third-party software, plugins, extensions, or systems not developed or authorized by GPUhub to log in to or use this service and/or this service, or to create, publish, or disseminate such tools. * (7) Interfering with this service and/or this service and its components, modules, data, etc., on your own, authorizing others, or using third-party software. * (8) Other actions that may affect or interfere with the normal operation of this service and/or this service. 8.1.3 Actions Endangering Platform Security You may not engage in, nor provide facilitation for, any of the following actions: * (1) Disseminating false lottery information, phishing fraud information, illegal or false financial information, and other illegal, fraudulent, or false information. * (2) Disseminating files, programs, or content containing viruses, trojans, or instructions for creating such content. * (3) Stealing others' personal information, virtual items, or other property. * (4) Other content, information, or actions that endanger the security of GPUhub, this service, or other entities. 8.2 Legal Liability 8.2.1 You understand and agree that if you violate laws and regulations, this agreement, and/or other agreements and rules of GPUhub, GPUhub has the right to take one or more of the following measures at any time based on the specific circumstances (the specific measures and the duration of the measures taken will be determined by GPUhub according to your illegal or breach of contract circumstances): * (1) Issuing a warning to you. * (2) Restricting your use of this service and/or part or all of the functions of this service. * (3) Deleting, blocking, or disconnecting relevant content or links. * (4) Suspending or terminating your use of the corresponding service account (hereinafter referred to as "banning"). * (5) Taking other reasonable and lawful measures. * (6) Pursuing your legal liability. 8.2.2 If you violate laws and regulations, this agreement, and/or other agreements and rules of GPUhub, and GPUhub takes any action or measure against you or the service you are using, resulting in your temporary or permanent inability to use the service, you shall bear the corresponding consequences (including but not limited to communication interruptions, clearing or inability to use user data, value-added services, products, or services, etc.). Any resulting losses shall be borne by you. 8.2.3 You should independently back up any data (including but not limited to friend information, pictures, personal profile information, photos, etc.) generated or stored in this service outside of this service in a reasonable and secure manner. If GPUhub takes permanent banning measures against you in accordance with this agreement, GPUhub has the right to delete all such data related to the service or all data and information stored in the service, and the corresponding consequences shall be borne by you. 8.2.4 If you cause any damage to a third party, you shall bear the responsibility independently; if GPUhub suffers any loss as a result, you shall also compensate accordingly. 8.3 You fully understand and agree that you must be responsible for all your actions when using this service and/or this service, including any content you publish and any consequences arising therefrom. You should independently judge the content you encounter when using this service and/or this service, including the risks arising from reliance on the correctness, completeness, or practicality of the content, and bear the corresponding risks. Within the scope permitted by law, GPUhub shall not be liable for any losses or damages caused by the aforementioned risks. 8.4 If the content you send or disseminate is illegal or infringes upon the rights of others, you agree that GPUhub has the right to independently determine and take measures such as deletion, blocking, or disconnection of links. If you are complained about by others or if you complain about others, GPUhub has the right to provide the relevant parties or relevant departments with necessary information such as the subject, contact information, and content of the complaint in the dispute in order to resolve the complaint and dispute in a timely manner and protect the legitimate rights and interests of all parties. ## IX. Third-Party Products or Services 9.1 When you use products or services provided by third parties on the GPUhub platform, in addition to complying with the terms of this agreement, you must also comply with the user agreements of the third parties. GPUhub and the third parties shall bear the respective responsibilities for any disputes that may arise within the scope of the laws and agreements. 9.2 When you use this service or request GPUhub to provide specific services, this service may call upon third-party systems or be supported by third parties for your use or access. The results of such use or access are provided by the third parties (including but not limited to services and content provided by third parties that you access through this service, and services and content accessed through the GPUhub open platform, etc.). ## X. Advertising 10.1 You agree that GPUhub may send or display advertisements or other information (including commercial and non-commercial information) to you through SMS, email, or electronic messages in various forms. The specific forms, frequencies, and content of the advertisements or other information shall be subject to what GPUhub actually provides. 10.2 GPUhub will conduct advertising business in accordance with relevant laws and regulations. You agree that you should carefully judge the authenticity and reliability of the advertisements in this service, and except as otherwise provided by law, you shall be responsible for any actions taken based on such advertisements. ## XI. Intellectual Property Rights Declaration 11.1 GPUhub is the owner of the intellectual property rights of this service. The copyrights, trademarks, patents, trade secrets, and other intellectual property rights of this service, as well as all information content related to this service (including but not limited to text, images, audio, video, charts, interface design, layout framework, relevant data, or electronic documents, etc.), are protected by laws and regulations and the relevant international treaties, and GPUhub legally enjoys the aforementioned intellectual property rights, except for the rights that the relevant right holders are entitled to by law. 11.2 Without the written consent of GPUhub or the relevant right holders, you may not implement, use, or transfer the aforementioned intellectual property rights for any commercial or non-commercial purposes on your own or permit any third party to do so. 11.3 Without the written consent of GPUhub, users may not reverse engineer, decompile, or disassemble this service. GPUhub reserves the right to pursue liability for any unauthorized actions. ## XII. Terminal Security Responsibility 12.1 You understand and agree that this service and/or this service, like most Internet software and services, may be affected by various factors (including but not limited to user reasons, network service quality, social environment, etc.); they may also be subject to various security issues (including but not limited to others illegally using user information to harass in real life; other software downloaded and installed by users or other websites visited may contain viruses, trojans, or other malicious programs that threaten the information and data security of your terminal, thereby affecting the normal use of this service and this service, etc.). Therefore, you should enhance your awareness of information security and personal information protection and pay attention to password protection to avoid losses. 12.2 You may not create, publish, use, or disseminate malicious programs for stealing GPUhub accounts and/or others' personal information or property. 12.3 Maintaining software security and normal use is the common responsibility of GPUhub and you. GPUhub will take necessary technical measures to protect your terminal information and data security in accordance with industry standards and with due diligence, but you acknowledge and agree that GPUhub cannot provide any guarantees in this regard. ## XIII. Third-Party Software or Technology 13.1 This service may use third-party software or technology (including open-source code and public domain code used by this service, etc.), and such use has been legally authorized. 13.2 If this service uses third-party software or technology, GPUhub will display the relevant agreements or other documents in accordance with relevant laws and regulations, which may be presented in the form of attachments to this agreement, in a specific folder within the service installation package, or in other forms. They may be expressed in the form of "Software License Agreement," "Authorization Agreement," "Open Source License," or other similar forms. 13.3 The aforementioned agreements or other documents displayed in various forms are integral parts of this agreement and have the same legal effect as this agreement. You shall comply with these requirements. If you fail to comply with these requirements, the third party or relevant authorities may take legal actions against you, impose fines, or take other punitive measures and may require GPUhub to provide assistance. You shall bear the legal liability on your own. ## XIV. Force Majeure and Other Exemptions from Liability 14.1 You understand and agree that during the use of this service, you may encounter risk factors such as force majeure that may affect this service. Force majeure refers to objective events that cannot be foreseen, overcome, or avoided and have a significant impact on one or both parties, including but not limited to natural disasters such as floods, earthquakes, plagues, and storms, as well as social events such as wars, riots, and government actions. In the event of such occurrences, GPUhub will strive to cooperate with relevant units in the first instance to handle the situation in a timely manner. However, for any losses caused to you thereby, GPUhub shall be exempt from liability within the scope permitted by law. 14.2 Within the scope permitted by law, GPUhub shall not be liable for service interruptions or obstructions caused by the following circumstances: * (1) Destruction caused by computer viruses, trojans, or other malicious programs, or hacker attacks. * (2) Failures of software, systems, hardware, and communication lines of you or GPUhub. * (3) Improper operation by users or use of this service through unauthorized means by GPUhub. * (4) Outdated program versions, aging of equipment, and/or compatibility issues. * (5) Other circumstances beyond the control or reasonable foresight of GPUhub. 14.3 You understand and agree that during the use of this service, you may encounter risks arising from network information or other user actions. GPUhub shall not be liable for the authenticity, applicability, or legality of any information, nor for any damages caused to you by infringing actions. These risks include but are not limited to: * (1) Information containing threats, defamation, or other illegal content from anonymous or impersonating others. * (2) Suffering from misguidance, deception, or other forms of psychological, physiological harm, or economic loss. * (3) Other risks arising from network information or user actions. 14.4 GPUhub's right to handle illegal and non-compliant content in accordance with the terms of this agreement does not constitute an obligation or commitment of GPUhub. GPUhub cannot guarantee timely detection of illegal actions or corresponding handling. 14.5 Users agree that in order to ensure the autonomy of GPUhub's business development and adjustments, GPUhub has the right to modify, suspend, interrupt, or terminate the services provided to users at any time without notice. If any losses are caused to users or others due to the aforementioned actions of GPUhub, GPUhub shall not bear any liability for compensation or other responsibilities. ## XV. Other 15.1 By using this service, you acknowledge that you have read and agree to be bound by this agreement. GPUhub reserves the right to modify the terms of this agreement when necessary. You may review the latest version of the agreement on the relevant service page. If you continue to use the software or services provided by GPUhub after the terms have been amended, it will be deemed that you have accepted the modified agreement. 15.2 Any disputes or controversies between you and GPUhub shall first be resolved through friendly consultation. If no agreement can be reached through consultation, you agree to submit the dispute or controversy to the competent court. 15.3 The headings of all clauses in this agreement are for reading convenience only and have no substantive meaning. They shall not be used as a basis for interpreting the meaning of this agreement. 15.4 If any term of this agreement is invalid or unenforceable for any reason, the remaining terms shall still be valid and binding on both parties. # Cookie Policy Source: https://docs.gpuhub.com/terms/cookie-policy We are committed to protecting your privacy and ensuring the security of your personal information. > GPUhub PTE. LTD. > > Last modified: March 15, 2025 *** This Cookie Policy explains how GPUhub (“Company,” “we,” “us,” and “our”) uses cookies and similar technologies to recognize you when you visit our website at [GPUhub](https://gpuhub.com/). It explains what these technologies are and why we use them, as well as your rights to control our use of them. ## What are cookies? Cookies are small data files that are placed on your computer or mobile device when you visit a website. Cookies are widely used by website owners to make their websites work, or to work more efficiently, as well as to provide reporting information. ## What are first-party and third-party cookies? Cookies set by the website owner (in this case, GPUhub) are called “first-party cookies.” Cookies set by parties other than the website owner are called “third-party cookies.” Third-party cookies enable third-party features or functionality to be provided on or through the website (e.g., advertising, interactive content, and analytics). The parties that set these third-party cookies can recognize your computer both when it visits the website in question and also when it visits certain other websites. ## What are session and persistent cookies? Session cookies are cookies that allow website operators to link the actions of a user during a browser session. A browser session starts when a user opens the browser window and finishes when they close the browser window. Session cookies are created temporarily. Once you close the browser, all session cookies are deleted. Persistent cookies are cookies that remain on a user's device for the period of time specified in the cookie. They are activated each time that the user visits the Website that created that particular cookie. ## What categories of cookies do we use? We use the following categories of cookies: * **Strictly Necessary Cookies**: These cookies are essential for the proper functioning and security of our Website. They enable you to move around the site and use its features. Without these cookies, some parts of our Website may not work as intended. * **Performance Cookies**: These cookies help us understand how visitors interact with our Website. They provide information about how visitors use the site, which pages are visited, and any error messages encountered. This allows us to improve the performance and user experience of our Website. * **Functional Cookies**: These cookies enable additional functionalities and personalization of our Website. They may be used to remember your preferences, settings, or login information. This allows for a more customized and convenient experience when using our site. * **Targeting Cookies**: These cookies are used to deliver content and advertisements that are more relevant to your interests. They track your browsing habits and may share this information with third parties for advertising purposes. ## Why do we use cookies? We use cookies for several important reasons: * To ensure the technical operation and security of our Website. * To enhance the user experience by providing personalized content and features. * To analyze how our Website is used and to improve its performance. * To deliver targeted advertising that may be of interest to you. ## How can I control cookies on my browser? You can manage your cookie preferences through your web browser settings. Most browsers allow you to accept, reject, or delete cookies. Here are some general steps you can follow: Open your web browser. 1. Locate and click on the settings or options menu (usually represented by three dots or lines). 2. Find the privacy or security settings section. 3. Look for an option related to cookies or site data. 4. Choose your preferred cookie settings. 5. Please note that blocking or deleting cookies may affect the functionality of some parts of our Website. ## How long do cookies stay on my device? The duration of cookies on your device varies depending on the type and purpose of the cookie. Session cookies are temporary and are deleted when you close your browser. Persistent cookies remain on your device for a longer period, as specified in the cookie. ## Updates to this Cookie Policy We may update this Cookie Policy from time to time to reflect changes in our practices or for other operational, legal, or regulatory reasons. We encourage you to review this Cookie Policy periodically for the latest information on our use of cookies. ## Contact Us If you have any questions or concerns about our use of cookies, please contact us at: [support@gpuhub.com](mailto:support@gpuhub.com) # Supplementary Agreement for Customized Instance Services Source: https://docs.gpuhub.com/terms/custom-instance-agreement By continuing to use the GPUhub platform and accessing the customized instance service, you acknowledge that you have read, understood, and agree to be bound by the terms of this agreement. > GPUhub PTE. LTD. > > Last modified: March 15, 2025 *** ## I. Content of the Agreement GPUhub conditionally provides the "Customized Service" feature to users who rent GPU instances on the platform. This feature allows users to establish services based on HTTP, FTP, TCP, and other protocols on port 6006 of their instances. GPUhub maps this port to a service accessible via "domain name + port number" for use and invocation by the user. The user has the need to use the aforementioned customized service. Both parties acknowledge that the customized service provided by GPUhub is designed to facilitate GPU-based research and is intended for research purposes only. ## II. Rights and Responsibilities The user commits to using the customized service provided by GPUhub solely for research purposes and exclusively by the user, without forwarding the customized service link to any third party. The user must complete real-name authentication to use the customized service feature provided by GPUhub. The user commits to never using the customized service provided by GPUhub in the following circumstances: * A. For any activities related to virtual currencies, including mining. * B. For any password cracking or decryption activities. * C. For generating pornographic, violent, or other illegal content using AI technology, including voice, text, images, or videos. * D. For establishing or renting dedicated lines (including VPNs) or other channels to conduct cross-border business activities. The user understands that the customized service is an open internet-based service. Once activated, any individual, organization, or computer program may potentially access the content placed on the customized service by the user. Therefore, the user commits to the following: * A. If the user uses the customized service to store sensitive or private data that leads to a data leak, the user shall bear full responsibility. * B. If the user uses the customized service to store pornographic, violent, or other illegal digital materials that spread on the internet, the user shall bear full responsibility. * C. If the user uses the customized service to generate pornographic, violent, or other illegal digital materials using AI technology that spread on the internet, the user shall bear full responsibility. * D. If the user violates the above commitments and engages in illegal activities, the user shall bear all legal responsibilities. GPUhub will actively utilize technical means to monitor the content exposed by the customized service and cooperate with relevant telecommunications regulatory and law enforcement departments in their monitoring efforts. Upon discovering any illegal or non-compliant content in the customized service, GPUhub will immediately suspend the user's account and terminate the customized service. This action will not be considered a violation of the [GPUhub Terms of Service](/terms/terms-of-service). If suspicious illegal activities are detected, GPUhub has the right to report to the police and provide relevant data. ## III. Liability for Breach of Contract If either the user or GPUhub violates the commitments in Article II of this agreement, it shall be deemed a breach of contract, and the breaching party shall bear the liability for breach of contract and compensate the non-breaching party for any losses incurred. If the user's activities using the customized service violate relevant national or regional laws and regulations or this agreement, and are discovered by GPUhub, or if the user's service (host, IP, domain) encounters the following issues, which are verified by GPUhub or ordered to be closed by relevant authorities, GPUhub has the right to suspend or terminate part or all of the services provided to the user. The user shall bear all losses suffered by GPUhub as a result. In case of suspension of services, GPUhub may choose to require the user to delete or modify inappropriate content, and resume services after the user has taken effective measures to eliminate the issues. The suspension period will be counted within the service period, and the user will not be exempt from service fees during this period: * (1) If there are programs or software that attack or hinder the normal work of others. * (2) If the user uses the host, IP, and domain to send spam emails (emails sent without the consent of the recipient). * (3) If there is dissemination of information that undermines social order or public security; dissemination of information that incites radical behavior, pornographic content, or the establishment of gambling or pornographic websites. * (4) If the user fails to provide network usage information (such as IP addresses, domains) as required by GPUhub, fails to fill in the information requested by GPUhub, or refuses to be inspected by GPUhub. * (5) If the user establishes or rents dedicated lines (including VPNs) or other channels to conduct cross-border business activities. * (6) If there are circumstances where national network regulatory authorities, security departments, or other government departments require suspension or closure, or other behaviors prohibited by laws, regulations, policies, or public morals. If the user violates the commitments made in this agreement or the above terms, resulting in complaints or claims from third parties against GPUhub, GPUhub has the right to interrupt internet access services, or even terminate this agreement and demand compensation for all direct losses from the user. If the user's actions lead to administrative penalties for GPUhub, GPUhub has the right to terminate this agreement and demand that the user pay a penalty, which may be deducted from any remaining balance in the user's account. In addition, the user shall bear all other or additional losses suffered by GPUhub as a result. If the user's illegal activities, such as writing, running, or using programs or software, cause network interruptions for GPUhub or prevent other users from using the cloud services normally, GPUhub has the right to interrupt internet access services or terminate this agreement. The user shall compensate GPUhub for all direct losses suffered as a result, which may be deducted from any remaining balance in the user's account. If the compensation is insufficient to cover GPUhub's losses, the user shall make up the difference. # Privacy Policy Source: https://docs.gpuhub.com/terms/privacy-policy We are committed to protecting your privacy and ensuring the security of your personal information. > GPUhub PTE. LTD. > > Last modified: March 15, 2025 *** At [GPUhub](https://gpuhub.com/), we are committed to protecting your privacy and ensuring the security of your personal information. This Privacy Policy outlines how we collect, use, store, share, transfer, and disclose your personal information when you use our services. It also explains your rights regarding your personal information. ## 1. Information We Collect ### 1.1 Registration Information When you register for an account on GPUhub, we collect the following information: * **Username**: The unique name you choose for your account. * **Email Address**: Used for account verification, password recovery, and receiving important notifications. * **Password**: To secure your account. We strongly recommend using a strong, unique password. After registration, you may choose to provide additional information, such as your real name, company name, job title, and contact details, to enhance your profile and improve our ability to serve you better. ### 1.2 Authentication Information To ensure the security of your account and comply with legal requirements, we may require additional authentication information: * **Government-Issued Identification**: Such as a passport or national ID number, which may be necessary for certain services or to comply with local regulations. * **Biometric Data**: In some cases, we may use facial recognition or other biometric data for enhanced security. This data is highly sensitive and will be handled with the utmost care. ### 1.3 Usage Data To provide and improve our services, we collect information about how you use our platform: * **IP Address**: To identify your location and ensure the security of your account. * **Device Information**: Such as the type of device you use to access our services. * **Activity Logs**: Including the date, time, and duration of your sessions, as well as specific actions you take on the platform. ### 1.4 Customer Support Information When you contact our customer support team, we may collect additional information to assist you: * **Support Requests**: Details of your inquiries and the responses provided. * **Communication Records**: Including emails, chat logs, and phone call records, to ensure we can effectively address your concerns and improve our services. ### 1.5 Payment Information To process payments for our services, we may collect: * **Payment Method Details**: Such as credit card numbers, bank account details, or other payment method information. * **Billing Information**: Including your name, address, and contact details for billing purposes. ### 1.6 Cookies and Similar Technologies We use cookies and similar technologies to enhance your experience on our platform: * **Authentication**: To recognize you when you return to our site. * **Preferences**: To remember your settings and preferences. * **Analytics**: To understand how you use our services and improve our platform. ## 2. Purpose of Collecting Information ### 2.1 Providing and Improving Services We use the information we collect to deliver the services you request, enhance your user experience, and continuously improve our platform. ### 2.2 Security and Compliance To protect the security of your account and our platform, and to comply with legal and regulatory requirements. ### 2.3 Communication To send you important notifications, updates, and information about our services. ### 2.4 Personalization To tailor our services to your preferences and needs. ### 2.5 Research and Development To conduct internal research and development activities aimed at improving our services and developing new features. ## 3. Storage of Information We store your personal information for as long as necessary to fulfill the purposes outlined in this Privacy Policy, unless a longer retention period is required or permitted by law. After the retention period, we will securely delete, anonymize, or de-identify your information. ## 4. Sharing of Information ### 4.1 With Your Consent We may share your personal information with third parties when you have given us explicit consent to do so. ### 4.2 Legal Requirements We may share your information if required by law, regulation, legal process, or governmental request. ### 4.3 Service Providers We may share your information with third-party service providers who perform services on our behalf, such as payment processing, customer support, and data analysis. These service providers are contractually obligated to protect your information and use it only for the purposes we specify. ### 4.4 Business Transfers In the event of a merger, acquisition, or sale of our business, we may transfer your information to the acquiring entity. We will notify you of such a transfer and ensure that your information continues to be protected in accordance with this Privacy Policy. ## 5. Transfer of Information We may transfer your personal information to other countries where we or our service providers operate. We will ensure that such transfers comply with applicable data protection laws and that your information remains protected. ## 6. Disclosure of Information We may disclose your personal information in the following circumstances: * **With Your Consent**: We will disclose your information if you have given us explicit consent to do so. * **Legal Requirements**: We may disclose your information if required by law, regulation, legal process, or governmental request. * **Protection of Rights**: We may disclose your information if we believe it is necessary to protect the rights, property, or safety of GPUhub, our users, or others. ## 7. Security of Your Information We take the security of your personal information very seriously and implement appropriate technical and organizational measures to protect it from unauthorized access, disclosure, alteration, or destruction. These measures include: * **Encryption**: We use encryption to protect your information both in transit and at rest. * **Access Controls**: We restrict access to your information to authorized personnel only. * **Regular Audits**: We conduct regular security audits to ensure our systems remain secure. ## 8. Your Rights ### 8.1 Access and Correction You have the right to access the personal information we hold about you and request corrections if the information is inaccurate or incomplete. ### 8.2 Deletion You have the right to request the deletion of your personal information. We will comply with your request unless we have a legal obligation to retain the information. ### 8.3 Opt-Out You have the right to opt-out of receiving marketing communications from us. You can do this by following the opt-out instructions in any marketing communication you receive or by contacting us directly. ### 8.4 Data Portability You have the right to request a copy of the personal information we hold about you in a portable format. ## 9. Children’s Privacy Our services are not intended for use by children under the age of 13. We do not knowingly collect personal information from children under 13. If we become aware that we have collected personal information from a child under 13, we will take steps to delete that information. ## 10. Changes to This Privacy Policy We may update this Privacy Policy from time to time to reflect changes in our practices or for other operational, legal, or regulatory reasons. We will notify you of any significant changes by posting a notice on our website or by sending you an email. ## 11. Contact Us If you have any questions or concerns about this Privacy Policy or our data practices, please contact us at [support@gpuhub.com](mailto:support@gpuhub.com). By using our services, you acknowledge that you have read and understood this Privacy Policy and consent to the collection, use, storage, sharing, transfer, and disclosure of your personal information as described herein. # Refund Policy Source: https://docs.gpuhub.com/terms/refund-policy Refund requests will only be considered for service issues directly caused by GPUHub and verified through our internal monitoring systems. > GPUhub PTE. LTD. > > Last modified: June 30, 2026 *** GPUHub operates on a prepaid, pay-as-you-go basis. Unless otherwise required by applicable law or expressly stated in this policy, all payments, subscriptions, prepaid balances, and promotional credits are non-refundable. ## Refund Principles GPUHub is committed to providing stable and reliable cloud computing services. If a service disruption is caused by GPUHub's platform, we will investigate the incident and, where appropriate, provide either a refund for the affected service period or equivalent GPUHub Credits. GPUHub is not responsible for issues arising from user configurations, applications, AI models, user code, local network environments, third-party services, or any other causes outside of GPUHub's direct control. Such issues are not eligible for refunds. ## Eligible Refunds Refunds may be approved under the following circumstances. ### 1. Platform-Caused Data Loss If data stored on GPUHub is permanently lost due to a platform-side hardware failure, storage failure, or service malfunction, you may apply for a refund. Please provide the following information: * Account email * Instance ID * Approximate time of the incident * Description of the lost data * Relevant logs or screenshots (if available) GPUHub will investigate the incident using internal monitoring records and determine whether the issue was caused by the platform. *** ### 2. Extended Network Connectivity Failure If your instance cannot be accessed due to a GPUHub platform-side network failure for an extended period of time, making the service unusable, you may request a refund for the affected service period. Please include: * Account email * Instance ID * Approximate start and end time * Error messages or screenshots * Connection logs, ping, traceroute, or other diagnostic information (if available) GPUHub will verify the incident using platform monitoring data. *** ### 3. Platform Hardware Failure If your instance becomes unusable due to GPU hardware failure or host hardware failure and GPUHub cannot restore service within a reasonable time by migration or replacement, you may request a refund for the affected service period. Please provide: * Account email * Instance ID * Approximate time of failure * Error messages or screenshots (if available) *** ## Required Evidence To help us investigate your request, please provide as much of the following information as possible: * Account email * Instance ID * Approximate incident time * Screenshots * Error messages * System logs * Connection test results (if applicable) * Any other relevant evidence Failure to provide sufficient information may delay or prevent investigation. *** ## Non-Refundable Situations Refunds will not be provided for, including but not limited to: * User configuration errors * Software bugs or application failures * AI model failures or training errors * User code issues * Resource exhaustion caused by user workloads * User-deleted instances or data * Idle prepaid balance * Promotional credits or bonus credits * Performance differences between models or workloads * Public Internet connectivity issues outside GPUHub's infrastructure * Third-party service failures * Scheduled maintenance announced in advance * Service interruptions caused by force majeure events *** ## Investigation Process All refund requests are subject to investigation. GPUHub reserves the right to reject requests if: * The reported issue cannot be verified; * Required evidence is not provided; * The issue was caused by user actions; * The issue originated from third-party software or external services; * Platform monitoring indicates the service was operating normally. GPUHub's internal monitoring records shall be used as the primary reference when determining service availability. *** ## Refund Method If a refund is approved, GPUHub may, at its sole discretion: * Refund the original payment method; or * Issue GPUHub account credits of equivalent value. The refund method depends on the payment channel, payment age, applicable regulations, and operational considerations. *** ## Limitation of Liability Any approved refund is limited to the charges paid for the affected service period. To the maximum extent permitted by applicable law, GPUHub shall not be liable for any indirect, incidental, consequential, special, or punitive damages, including but not limited to: * Loss of profits * Loss of business opportunities * Loss of training progress * Model retraining costs * Data reconstruction costs * Business interruption * Any other consequential losses GPUHub's total liability shall not exceed the amount paid for the affected service. *** ## Contact To request a refund, please contact: [support@gpuhub.com](mailto:support@gpuhub.com) Please include: * Account email * Instance ID * Payment information (if applicable) * Description of the issue * Relevant evidence Our support team will review your request and respond as soon as reasonably possible. *** ## Policy Updates GPUHub reserves the right to modify this Refund Policy at any time. Any updates will become effective immediately upon publication on the GPUHub website unless otherwise required by applicable law. # Security Vulnerability Reporting Policy Source: https://docs.gpuhub.com/terms/security-reporting This policy explains how to report a potential security issue to GPUHub and establishes the boundaries for responsible security research involving our services. GPUHub takes the security of our platform, infrastructure, and users seriously. We appreciate the efforts of security researchers and members of the community who responsibly report potential security vulnerabilities to us. ## Reporting a Security Vulnerability If you believe you have identified a security vulnerability affecting GPUHub, please report it to: [support@gpuhub.com](mailto:support@gpuhub.com) Please include as much relevant information as possible so that our technical team can reproduce and evaluate the issue. A useful report should include: * A description of the vulnerability * The affected URL, API endpoint, service, or component * Steps required to reproduce the issue * The potential security impact * Screenshots, logs, request/response examples, or other supporting evidence where applicable * Any conditions required to reproduce the vulnerability * Your contact information for follow-up Please avoid including unnecessary personal information, credentials, access tokens, or data belonging to other GPUHub users. ## Responsible Testing Security research must be conducted in a manner that does not compromise the security, privacy, availability, or integrity of GPUHub, our infrastructure, or our users. When investigating a potential vulnerability, please: * Use your own GPUHub account and resources whenever possible. * Limit testing to the minimum necessary to demonstrate the vulnerability. * Stop testing once sufficient evidence has been collected to demonstrate the issue. * Avoid accessing, modifying, downloading, or deleting data belonging to other users. * Avoid actions that could degrade or interrupt GPUHub services. * Report the vulnerability to us promptly after confirming it. Discovery of a potential vulnerability does not constitute authorization to perform additional testing beyond what is reasonably necessary to demonstrate the issue. ## Prohibited Activities The following activities are not permitted without prior written authorization from GPUHub: * Denial-of-service (DoS/DDoS) testing or other availability attacks * Stress testing or intentionally generating excessive traffic * Destructive testing * Social engineering, phishing, or impersonation * Testing against GPUHub employees, customers, suppliers, or partners * Accessing or attempting to access another user's account * Accessing, modifying, downloading, or deleting another user's data * Credential stuffing or brute-force attacks * Large-scale automated vulnerability scanning * Introducing malware, cryptominers, ransomware, or other malicious software * Attempting to maintain persistent unauthorized access * Physical attacks against GPUHub infrastructure or facilities * Testing third-party services or infrastructure that are not operated by GPUHub * Public disclosure of an unresolved vulnerability before GPUHub has had a reasonable opportunity to investigate and address it If your testing unexpectedly provides access to another user's data, credentials, internal systems, or other sensitive information, **stop testing immediately and report the issue to us**. Do not continue exploring or collecting additional information. ## Production Environment GPUHub is a live GPU cloud platform used by customers for production workloads. Security research must therefore be conducted carefully and must not interfere with running GPU instances, network services, storage systems, APIs, payment systems, or other customers' workloads. Please do not attempt to demonstrate the severity of a vulnerability by disrupting production services. A clear reproduction procedure or limited proof of concept is generally sufficient for our team to investigate an issue. ## Bug Bounty and Monetary Rewards GPUHub currently **does not operate a public bug bounty program**. Submitting a vulnerability report does not create any contractual obligation for GPUHub to provide payment, compensation, rewards, employment, or other benefits. GPUHub may, at its sole discretion, choose to recognize particularly valuable security contributions. Any such recognition is voluntary and should not be interpreted as establishing a bug bounty program or an expectation of payment for future reports. Please do not conduct additional or more intrusive testing based on the expectation of receiving a reward. ## Security Testing Services Submission of a vulnerability report should not be interpreted as authorization to provide penetration testing, security auditing, vulnerability scanning, or other professional services to GPUHub. GPUHub does not accept unsolicited security testing services through the vulnerability reporting process. Any formal penetration testing or security assessment must be separately authorized in writing by GPUHub. ## Duplicate, Informational, and Low-Impact Reports We appreciate all good-faith reports, but we may not individually respond to reports that are duplicate, purely informational, or do not represent a meaningful security risk. Examples may include: * Missing security headers without demonstrated security impact * Version disclosure without a demonstrated vulnerability * Publicly available information * Self-XSS requiring the user to execute code themselves * Issues requiring unrealistic or highly unlikely user interaction * Reports generated solely by automated vulnerability scanners without verification * Rate-limit observations without demonstrated security impact * Best-practice recommendations without an exploitable vulnerability * Vulnerabilities affecting unsupported browsers, software, or third-party systems outside GPUHub's control A vulnerability scanner result alone does not necessarily demonstrate a security vulnerability. Please verify findings and provide reproducible evidence before submitting a report. ## Third-Party Services GPUHub uses third-party services and infrastructure as part of operating our platform. Vulnerabilities that exclusively affect a third-party product or service should generally be reported directly to the relevant provider. If you believe a third-party vulnerability creates a specific security risk for GPUHub or GPUHub users, you may still notify us so that we can evaluate the potential impact. ## Handling of Vulnerability Reports After receiving a security report, GPUHub may: 1. Review and validate the reported issue. 2. Request additional information where necessary. 3. Assess the potential impact and severity. 4. Develop and deploy appropriate mitigations or fixes. 5. Contact the reporter if further clarification is required. The time required to investigate and resolve an issue depends on its complexity, severity, and potential impact. We cannot guarantee a specific response or remediation timeline for every report. ## Confidentiality and Disclosure We ask security researchers to give GPUHub a reasonable opportunity to investigate and remediate reported vulnerabilities before making information publicly available. Please do not publicly disclose vulnerability details, proof-of-concept code, sensitive technical information, or information that could enable exploitation while an issue remains unresolved. If you would like to publish research concerning a vulnerability reported to GPUHub, please contact us before publication so that disclosure can be coordinated where appropriate. ## Good-Faith Research We appreciate security research performed in good faith and in accordance with this policy. This policy is intended to provide guidance for responsible vulnerability reporting. It does **not** grant unrestricted permission to test GPUHub systems and does not authorize activities that would otherwise violate applicable laws, agreements, or the rights of GPUHub or third parties. Researchers remain responsible for ensuring that their activities comply with applicable laws and regulations. ## Contact For security vulnerability reports: **[support@gpuhub.com](mailto:support@gpuhub.com)** Please use the subject line: **Security Vulnerability Report – \[Brief Description]** Thank you for helping us keep GPUHub and our users secure. # Terms of Service Source: https://docs.gpuhub.com/terms/terms-of-service By using GPUhub, you agree to our Terms of Service, which includes our commitment to protecting your privacy and ensuring the security of your personal information. > GPUhub PTE. LTD. > > Last modified: March 15, 2025 *** Welcome to GPUhub! These Terms of Service ("Agreement") govern your access to and use of the services provided by [GPUhub](https://gpuhub.com/), a Singapore-based company. By visiting, accessing, or using GPUhub, you agree to be bound by this Agreement. Please read it carefully. ## Definitions * **Account Information:** Information you provide for account setup and administration, including contact details, usernames, email addresses, and billing information. * **Services:** Cloud and web-based services or computing resources provided by GPUhub, accessed through authorized accounts using login credentials. * **Customer Content:** Applications, software, files, data, and other content related to your use of the Services, excluding Account Information. ## Provision of Services Subject to this Agreement, GPUhub will use reasonable efforts to provide the Services available from time to time. GPUhub may update, change, discontinue, or deprecate the Services or modify their features and functionality. Any adverse impacts on functionality will be communicated via the email associated with your account. ## Privacy Policy We respect your privacy and collect personal information only as needed to provide requested services and improve GPUhub. By using GPUhub, you agree to the collection and use of information as outlined in this Agreement. ### Information You Provide * Registration information must be truthful and accurate. * We may ask for details like your username, real name, birthdate, address, phone number, and email address. * Messages sent through GPUhub and user content may be retained. * This information is used to operate and maintain GPUhub. * Your username and optionally disclosed real name may be publicly visible in forums. * We will not sell, trade, rent, or disclose this information to third parties, except for site security, law enforcement, or fulfilling specific requests. ### Information We Collect Automatically * When visiting GPUhub, your browser may send us information such as: * Internet domain and IP address. * Browser and operating system type. * Device type. * Access date and time. * Referring website address. * This information is used in aggregate form to maintain and improve GPUhub. * It is not used to identify individuals unless for site security or law enforcement purposes. ### Links to Other Websites * GPUhub may provide links to third-party websites and applications. * We are not responsible for the information, content, or privacy practices of these third parties. * This Agreement applies only to information collected through GPUhub. * The privacy policies of third-party websites or applications accessed through GPUhub will apply to your use of those sites or applications. ### Your Rights Regarding Personal Information * You can update your account information and email preferences at any time by contacting us or changing your profile settings. * You may opt out of promotional emails but cannot opt out of service-related communications. * We retain the right to keep your information as long as needed. * After account termination, we may keep your private profile information for backup, archival, or audit purposes. ### Security * We take reasonable efforts to protect the security of your personal information. * No method of transmission or storage is 100% secure, and we cannot guarantee absolute security. * You are responsible for maintaining the secrecy of your password and account information. ### Cookies * Cookies are small data files that may include an anonymous unique identifier. * We may use cookies to collect information and customize your experience. * You can instruct your browser to refuse cookies, but some features may not function properly. ### Google Analytics * We use Google Analytics to collect information about site usage. * Google Analytics collects IP addresses but not personally identifiable information. * The information is used to improve GPUhub and is subject to Google's privacy policies. ## Acceptable Use and User Responsibilities By using the Services, you agree not to: * Resell or sublicense the Services or access credentials. * Modify, alter, or create derivative works of any software included in the Services. * Reverse engineer, disassemble, or decompile the Services. * Use the Services in a manner that violates law, infringes rights, or attempts unauthorized access. * Spam, distribute malware, or harm the use of the Services. * Work around technical limitations or use the Services in applications where failure could lead to serious injury. You are responsible for the proper configuration and use of the Services, including maintaining security and backups of your Customer Content. ## Age Restrictions Users under the age of 18 must have parental or guardian permission and supervision to use GPUhub. ## Confidential Information Both parties agree to protect the secrecy of each other's confidential information and avoid unauthorized use or disclosure. This obligation does not apply to information that is publicly available, already known, rightfully disclosed by a third party, or independently developed. ## Payment * Our pricing is based on the instances you choose to rent, with changes reflected before starting a machine. * You will be billed immediately upon starting an instance and charged for a full hour. * Paused and resumed instances are treated as new and charged hourly. * You authorize us to charge your payment method for fees incurred. * You are responsible for all fees, including taxes, associated with using GPUhub. * We reserve the right to correct pricing errors even after payment has been requested or received. * All payments are in US Dollars. ## Refund Policy All sales are final, and no refunds will be issued. > [Refund Policy](terms/refund-policy.mdx) ## Cancellation and Termination * It is your responsibility to cancel your GPUhub account by emailing us. * We reserve the right to suspend or terminate your access at any time, with or without cause or notice. * Provisions related to disclaimers, indemnity, and limitations of liability will survive termination. * Free credits provided for trying the system cannot be converted to real money and are for deep learning purposes only, not for cryptocurrency mining or blockchain. * Instances should be used for deep learning only. Accounts found violating this Agreement may be terminated. ## Intellectual Property * You retain all rights to Customer Content created using the Services. * GPUhub owns all rights to the Services and related software, including improvements and derivative works. * Your use of the Services is limited to the rights expressly granted in this Agreement. ## Indemnity You agree to indemnify and hold harmless GPUhub, its affiliates, licensors, and their respective employees, agents, officers, directors, and representatives from all liabilities, damages, losses, and costs arising from third-party claims related to Customer Content, your use of the Services in violation of this Agreement or law, or the combination of Customer Content with third-party software, applications, content, or processes. ## Disclaimers, Warranties, and Limitation of Liability * GPUhub makes no guarantees regarding site availability due to technical issues beyond our control. * We are not liable for any loss or damage, including indirect or consequential damages. * The Services are provided "as is" and "as available." * We disclaim all warranties, including merchantability and fitness for a particular purpose. * We are not liable for any damages arising from the use of GPUhub or the Services. ## Applicable Law and Dispute Resolution * This Agreement is governed by the laws of Singapore without regard to conflict of laws principles. * Any disputes arising from this Agreement will be resolved through arbitration in Singapore, conducted in English and in accordance with the Arbitration and Conciliation Act of Singapore. ## Communications with GPUhub * By using GPUhub, you consent to receive communications from us electronically. * We will communicate with you via email or by posting notices on GPUhub. * If you have any questions about this Agreement, please contact us at [support@gpuhub.com](mailto:support@gpuhub.com). ## Miscellaneous * The relationship between the parties is that of independent contractors. * This Agreement constitutes the entire agreement between the parties and supersedes any prior agreements. * Neither party will be liable for failures due to force majeure events beyond their reasonable control. * If any provision of this Agreement is found to be invalid, the remaining provisions will continue in full force and effect. ## Changes to this Agreement * We reserve the right to update or change this Agreement at any time. * Continued use of GPUhub after modifications are posted constitutes your acknowledgment and consent to the changes. * Material changes will be notified via email or a prominent notice on our website. Thank you for using GPUhub. If you have any questions or concerns, please do not hesitate to contact us. # Networks Source: https://docs.gpuhub.com/troubleshooting/networks Not blazing fast, but stable. ## Shared Network Bandwidth > [!NOTE] > > GPUHub uses a shared bandwidth model for GPU instances. Network bandwidth and traffic are included with the instance and are not billed separately. ![](https://mintcdn.com/gpuhub/Quv65O5Baivb6kO7/images/strange-of-services.png?fit=max\&auto=format\&n=Quv65O5Baivb6kO7\&q=85\&s=27ea92e2c6ca32f13649327d713f2122) Network performance varies by region and host. Each region and host may have its own bandwidth capacity and transmission limits. The bandwidth available to an individual instance is not guaranteed and should not be interpreted as dedicated bandwidth. The total upstream bandwidth available in a region may be approximately 1–2 Gbps, but this capacity is shared among multiple hosts and instances. Actual upload and download speeds may vary depending on the region, host, concurrent network usage, destination server, network route, and time of day. ## Network Performance During Peak Hours During periods of high network activity, large dataset transfers by other users may reduce SSH responsiveness and file transfer speeds. This affects network-related operations only and does not directly affect local GPU training or computation performance. ## Downloading Large Models or Datasets > [!WARNING] > > Non-GPU Mode provides only limited CPU and memory resources and is intended primarily for tasks such as downloading models or datasets and preparing files, rather than compute-intensive workloads. Large models and datasets can sometimes take a significant amount of time to download, especially during periods of high network utilization. > [!NOTE] > > By default, each account can run only one instance in Non-GPU Mode at a time. If you do not need GPU compute while downloading files, you can start the instance in Non-GPU Mode and complete the download first. Once the required models, datasets, or other files are ready, restart the instance with GPU resources and begin your workload. This helps avoid occupying and paying for GPU resources while simply waiting for large downloads to complete. ![](https://mintcdn.com/gpuhub/68mupI2L7c06Uf2x/images/non-gpu-mode.png?fit=max\&auto=format\&n=68mupI2L7c06Uf2x\&q=85\&s=4a971fa40f330326f22d1905ccee2322) > [!WARNING] > > GPU availability is not reserved in Non-GPU Mode. When you switch an instance to Non-GPU Mode, the GPU hardware previously used by your instance is released and may be allocated to other users. As a result, there is no guarantee that the same GPU, or even an available GPU, will still be available when you are ready to restart the instance with GPU resources. We recommend using Non-GPU Mode for long downloads or environment preparation only when you are comfortable releasing your current GPU allocation. # Troubleshooting Source: https://docs.gpuhub.com/troubleshooting/troubleshooting Yes. Sh*t happens. Due to the inevitability of hardware failures and other unforeseen circumstances, certain incidents may occur. > [!WARNING] > > We strongly recommend that users regularly back up important data to prevent potential losses. For further assistance, please contact our customer support team. ## Instance Downtime * **Confirmation Criteria:** The instance status is "Shutdown - Unexpected Downtime." > **Instance Downtime Compensation** > > **Calculation:** Compensation duration is calculated from the last startup to the downtime moment, capped at 24 hours. > > **Compensation Amount:** > > * For Pay-as-you-go instances: > * Compensation Voucher Amount = Duration (hours) \* Instance Unit Price (USD/hour) > * For Subscription instances: > * Unit Price = Subscription Amount / Subscription Duration > * Compensation Voucher Amount = Duration (hours) \* Unit Price ## Network Failure * **Confirmation Criteria:** Network anomalies in the instance (not caused by local user-to-instance connection issues, such as using a VPN). > **Network Failure Compensation** > > **Calculation:** Total duration of the anomaly (in minutes) \* 1.5, rounded up to the nearest hour. > > **Compensation Amount:** > > * For Pay-as-you-go instances: > * Compensation Voucher Amount = Duration (hours) \* Instance Unit Price (USD/hour) > * For Subscription instances: > * Unit Price = Subscription Amount / Subscription Duration > * Compensation Voucher Amount = Duration (hours) \* Unit Price ## Local Disk Failure * The system disk and data disk (/root/gpuhub-tmp) provided by GPUhub are local disks on the host. While local disks offer better performance, they lack redundant backups and may experience disk failures. * Yes. We strongly recommend that users regularly back up important data to prevent potential losses, again. > [!WARNING] > > GPUhub does not provide compensation for local disk failures. For further assistance, please contact customer support. ## Other Scenarios The following scenarios are not eligible for compensation: 1. The instance status is normal ("Running"), but the program exits prematurely due to reasons such as not running in the background. 2. GPU memory not being correctly released due to driver issues, which can be resolved without restarting the instance. 3. System dependency errors caused by user actions, resulting in inaccessible services like JupyterLab. These can be resolved by resetting the system. 4. Other similar scenarios. ## Contacting Support For any questions or concerns regarding these incidents, please contact our customer support team for further assistance. We apologize for any inconvenience caused and appreciate your understanding.