> For the complete documentation index, see [llms.txt](https://data-programs.gitbook.io/singularity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://data-programs.gitbook.io/singularity/jp/installation/install-from-source.md).

# ソースからビルドする

Singularityをインストールする前に、システムに[Go 1.20以上](https://golang.org/dl/)がインストールされているかどうかを確認してください。

## Goのセットアップ

Goを使用するためには、次の手順に従ってください:

1. **Goのバイナリをダウンロードして展開**:

   ```bash
   wget -c https://golang.org/dl/go1.20.7.linux-amd64.tar.gz -O - \
       | sudo tar -xz -C /usr/local
   ```
2. **PATHを更新**: Goのバイナリディレクトリとワークスペースディレクトリを`PATH`に追加します:

   ```bash
   echo 'export PATH=$PATH:/usr/local/go/bin:$(/usr/local/go/bin/go env GOPATH)/bin' \
       >> ~/.bashrc && source ~/.bashrc
   ```

## 最新リリースのSingularityのインストール

最新の安定版Singularityの場合:

```bash
go install github.com/data-preservation-programs/singularity@latest
```

## 未リリースの機能を試す

最新の未リリース機能を試したい場合:

1. **Singularityリポジトリをクローンする**:

   ```bash
   git clone https://github.com/data-preservation-programs/singularity.git
   ```
2. **Singularityディレクトリに移動**:

   ```bash
   cd singularity
   ```
3. **ビルドしてインストール**:

   ```bash
   go build -o singularity .
   cp singularity $GOPATH/bin
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://data-programs.gitbook.io/singularity/jp/installation/install-from-source.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
