# ​​コンテナへの接続方法​?

特定のニーズ、好み、およびコンテナの作成に使用したテンプレートに応じて、いくつかの異なる方法で GPU コンテナに接続できます。

#### HTTP サービス

HTTP経由でコンテナに接続するのは便利で、迅速かつHTTPS経由で安全です。 HTTPサービスを使用して接続するには：

ステップ1: コンテナの実行が開始されたら、コンテナ詳細ページに移動します。

ステップ2: 「コンテナへのアクセス」セクションを見つけ、「HTTPエンドポイント」を開きます。

ステップ3：お使いのテンプレートに合ったガイドに従ってください。

| テンプレート | Jupyter、Code Server                                                                                    | Ollama WebUI                                                                                                          | Ollama                      | Vllm                                                                                                 |
| ------ | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- |
| 前提条件   | なし                                                                                                     | なし                                                                                                                    | なし                          | <p>Hugging Face トークン (\*) </p><p>新しいコンテナを作成する前に、環境変数セクションにHugging Faceトークンを入力する必要があります。 </p><p> </p> |
| 次の手順   | <ul><li>ブラウザでエンドポイントを開く </li><li>コンテナ詳細ページの環境変数セクションにあるユーザー名とパスワードフィールドを使用してコンテナにアクセスしてください </li></ul> | <ul><li>ブラウザでエンドポイントを開く </li><li>新しい Open WebUI アカウントを作成するか、既存のアカウントを使用します。 </li><li>モデルを選択してプルし、テストします。   </li></ul> | Postmanを使用したコンテナのテスト (\*\*) | Postmanを使用したコンテナのテスト (\*\*)                                                                          |

(\*) Hugging Face トークン: Ollama テンプレートを使用する場合、環境変数セクションの Hugging Face トークンが必要です。Hugging Face トークンをお持ちでない場合は、こちらのガイド[「ユーザーアクセストークン」](https://huggingface.co/docs/hub/en/security-tokens)に従ってください。&#x20;

(\*\*) Postmanによるコンテナテスト：エンドポイントに/v1/modelsを追加し、AuthorizationにAPI\_TOKENを指定してください。vLLMテンプレートを使用している場合は、コンテナテストのためリクエストパラメータにHUGGING\_FACE\_HUB\_TOKENも含めてください。

**TCPポート**

パブリックエンドポイント経由でインスタンスにアクセスするには、コンテナ設定にTCPポートを追加する必要があります。コンテナ作成時に、サービスアクセス用のパブリックドメインと外部パブリックポートマッピングが提供されます。外部パブリックポートは30000～40000の範囲からランダムに選択されます。

形式は DOMAIN:EXTERNAL\_PORT → INTERNAL\_PORT となります。例：

tcp-endpoint-stg.serverless.fptcloud.com:34771 → :22

**SSHターミナル**

1. コンテナのSSHコマンドを取得するには、コンテナ詳細ページに移動します。SSHコマンド欄に記載されているコマンドをコピーしてください。

<figure><img src="/files/87e86c4008f238d0c970954a0f5752f6569cf656" alt=""><figcaption></figcaption></figure>

以下のような形式になります：

`ssh [root@tcp-endpoint-stg.serverless.fptcloud.com](mailto:root@tcp-endpoint-stg.serverless.fptcloud.com) -p 34771 ~/.ssh/id_e25595`

1. ローカル端末でコピーしたコマンドを実行し、コンテナに接続します。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-docs.fptcloud.com/ai-factory-guideline-jp/fpt-gpu-cloud/gpukontena/chtoriaru/kontenaheno.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
