Tazro Inutano Ohta
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Pitagora Meetup 2021-08 ### 大田 - 理研の臨床DBのテスト - 修正すべき箇所を発見して修正してもらいました - 今週ついに閉鎖系にデプロイ予定 - 腸内細菌叢データの解析ワークフロー in CWL をいじって走らせている - https://github.com/pitagora-network/DAT2-cwl/tree/update-qiime-version/workflow/meta16s-seq - `docker-compose` から `docker compose` へ - https://logmi.jp/tech/articles/324732 ### 池田 - cwltool の scatterの同時実行を制限するには... ``` hints: ResourceRequirement: coresMin: xxx <- の数で scatterの並列実行数を制御するしかないみたい ``` - https://www.commonwl.org/v1.2/CommandLineTool.html#Requirements_and_hints > If the same process requirement appears at different levels of the workflow, the most specific instance of the requirement is used, that is, an entry in requirements on a process implementation such as CommandLineTool will take precedence over an entry in requirements specified in a workflow step, and an entry in requirements on a workflow step takes precedence over the workflow. Entries in hints are resolved the same way. - 下の方で `hints` で指定している場合は、上の方で `requirements` を使えば上書きできる > Requirements override hints. If a process implementation provides a process requirement in hints which is also provided in requirements by an enclosing workflow or workflow step, the enclosing requirements takes precedence. 参考(石井): https://www.biostars.org/p/380743/ 参考(石井):全体側で、8GBとかいてあって、中の使うツールが32GB必要としていたら、中のツールのものが採用される。 ### 末竹 - 理研の臨床 DB の bug 修正 - rootless docker - https://docs.docker.jp/engine/security/rootless.html - > Rootless モードは Docker デーモンのインストールに root 権限を必要としないだけでなく、 事前準備 においても不要です。 - > Rootless モードは Docker Engine v19.03 から導入されました。 - Docker daemon と container を user namespace 内で実行する - 素の docker は root 権限で動作するが、rootless mode はそれも必要ない - Singularity 死んだのでは - Ubuntu 18.04 で実験する - `$ docker --version \ Docker version 19.03.8, build afacb8b7f0` - install 用の script が用意されている - `$ curl -fsSL https://get.docker.com/rootless | sh` - shellscript - `docker.tgz` と `rootless.tgz` を download して、`$HOME/bin` 以下に展開する - error が出た - `# Installing stable version 20.10.8` - `Aborting because rootful Docker is running and accessible. Set FORCE_ROOTLESS_INSTALL=1 to ignore.` - 現状ただの extract のみだから、force でやってみる - `curl -fsSL https://get.docker.com/rootless | FORCE_ROOTLESS_INSTALL=1 sh` - と思ったら、`systemctl --user start docker.service` をしている - `systemctl status docker.service` は root docker, `systemctl --user status docker.service` は rootless docker になっていて、別々の docker daemon が動いている - rootless はそのまま触れる - `which docker` は `/usr/bin/docker` - `/usr/bin/docker ps` も `~/bin/docker ps` も両方同じ結果を返す - すでに上がっている docker container - 多分、環境変数 `DOCKER_SOCK` とかでどれを指定するかの問題なのだと思われる - `DOCKER_HOST=unix:///run/user/1000/docker.sock docker ps` で rootless docker を使用できた - permission 周りなどを確認してみる - `mkdir -p sandbox/rootless && cd sandbox/rootless` - `docker run -it --rm -u 0:0 -v $PWD:$PWD -w $PWD -p 80:80 ubuntu:latest bash` - 80 番は bind できないから 1024 以上にしろと怒られる - `docker run -it --rm -u 0:0 -v $PWD:$PWD -w $PWD -p 8080:8080 ubuntu:latest bash` - 行けた - `id` => `uid=0(root) gid=0(root) groups=0(root)` - `ls -l` => `root:root` - `touch foo` => Host 側では `1000:1000` - Docker image の置き場所は違う - めっちゃ強いやん - Singularity と uDocker が完全に死んだ - Sapporo や cwltool も動かせると思う - 実験してみる - [TODO] docker siblings の実験 - Docker sock は `/run/user/1000/docker.sock` - `docker run -it --rm -v $PWD:$PWD -w $PWD -v /run/user/1000/docker.sock:/var/run/docker.sock -v $HOME/bin/docker:/usr/bin/docker ubuntu:latest bash` - `docker ps` - `8d48a6321b54 ubuntu:latest "bash" 3 seconds ago Up 1 second agitated_benz` - [TODO] docker-compose の実験 - 下記参照 - 普通に行けた ``` $ cat docker-compose.yml version: "3" services: app: image: ubuntu:latest volumes: - ${PWD}:${PWD} restart: on-failure working_dir: ${PWD} ports: - 8080:8080 command: ["sleep", "infinity"] ``` ``` $ export DOCKER_HOST=unix:///run/user/1000/docker.sock $ docker-compose up -d Creating network "rootless_default" with the default driver Creating rootless_app_1_4761f6b4242a ... done $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 17f4ec371387 ubuntu:latest "sleep infinity" 4 seconds ago Up 2 seconds 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp rootless_app_1_d8f844bf6247 ``` - [TODO] cwltool の実験 - https://github.com/suecharo/sapporo_test_workflows - これで実験してみる - cwltool 自体も docker container 内で動かして、かつ、docker sibling で container 内で解析をしてみる - `commonworkflowlanguage/cwltool:1.0.20191225192155` がなくなってた - めっちゃ困る - 代わりに `suecharo/cwltool:1.0.20191225192155` を push しておいた - 出来た ``` $ git clone git@github.com:suecharo/sapporo_test_workflows.git $ cd sapporo_test_workflows $ docker run -i --rm \ -v /run/user/1000/docker.sock:/var/run/docker.sock \ -v $HOME/bin/docker:/usr/bin/docker \ -v /tmp:/tmp \ -v $PWD:$PWD \ -w=$PWD \ suecharo/cwltool:1.0.20191225192155 \ --outdir ./results/qc_and_trimming/cwl \ ./qc_and_trimming/cwl/trimming_and_qc.cwl \ --fastq_1 ./qc_and_trimming/ERR034597_1.small.fq.gz \ --fastq_2 ./qc_and_trimming/ERR034597_2.small.fq.gz \ --nthreads 2 INFO /usr/local/bin/cwltool 1.0.20191225192155 INFO Resolved './qc_and_trimming/cwl/trimming_and_qc.cwl' to 'file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/qc_and_trimming/cwl/trimming_and_qc.cwl' INFO [workflow ] start INFO [workflow ] starting step trimming INFO [step trimming] start INFO ['docker', 'pull', 'quay.io/biocontainers/trimmomatic:0.38--1'] INFO [job trimming] /tmp/4kpx7i_w$ docker \ run \ -i \ --volume=/tmp/4kpx7i_w:/pulQFx:rw \ --volume=/tmp/gwb9hcws:/tmp:rw \ --volume=/home/ubuntu/sandbox/rootless/sapporo_test_workflows/qc_and_trimming/ERR034597_1.small.fq.gz:/var/lib/cwl/stg5a064d4d-ec4e-46bd-893f-0114187f4eaa/ERR034597_1.small.fq.gz:ro \ --volume=/home/ubuntu/sandbox/rootless/sapporo_test_workflows/qc_and_trimming/ERR034597_2.small.fq.gz:/var/lib/cwl/stgb2f710e6-0061-4261-8467-1b498228057d/ERR034597_2.small.fq.gz:ro \ --workdir=/pulQFx \ --read-only=true \ --log-driver=none \ --user=0:0 \ --rm \ --env=TMPDIR=/tmp \ --env=HOME=/pulQFx \ --cidfile=/tmp/exltyocf/20210816072136-650899.cid \ quay.io/biocontainers/trimmomatic:0.38--1 \ trimmomatic \ PE \ -threads \ 2 \ /var/lib/cwl/stg5a064d4d-ec4e-46bd-893f-0114187f4eaa/ERR034597_1.small.fq.gz \ /var/lib/cwl/stgb2f710e6-0061-4261-8467-1b498228057d/ERR034597_2.small.fq.gz \ ERR034597_1.small.fq.trimmed.1P.fq \ ERR034597_1.small.fq.trimmed.1U.fq \ ERR034597_1.small.fq.trimmed.2P.fq \ ERR034597_1.small.fq.trimmed.2U.fq \ ILLUMINACLIP:/usr/local/share/trimmomatic/adapters/TruSeq2-PE.fa:2:40:15 \ LEADING:20 \ TRAILING:20 \ SLIDINGWINDOW:4:15 \ MINLEN:36 > /tmp/4kpx7i_w/trimmomatic-pe-stdout.log 2> /tmp/4kpx7i_w/trimmomatic-pe-stderr.log INFO [job trimming] Max memory used: 4138MiB INFO [job trimming] completed success INFO [step trimming] completed success INFO [workflow ] starting step qc_1 INFO [step qc_1] start INFO ['docker', 'pull', 'quay.io/biocontainers/fastqc:0.11.9--0'] INFO [job qc_1] Max memory used: 3723MiB INFO [job qc_1] completed success INFO [step qc_1] completed success INFO [workflow ] starting step qc_2 INFO [step qc_2] start INFO [job qc_2] /tmp/sho17x8u$ docker \ run \ -i \ --volume=/tmp/sho17x8u:/pulQFx:rw \ --volume=/tmp/mgkcovmq:/tmp:rw \ --volume=/home/ubuntu/sandbox/rootless/sapporo_test_workflows/qc_and_trimming/ERR034597_2.small.fq.gz:/var/lib/cwl/stgb4cec480-504d-44b3-b986-742de874a62f/ERR034597_2.small.fq.gz:ro \ --workdir=/pulQFx \ --read-only=true \ --log-driver=none \ --user=0:0 \ --rm \ --env=TMPDIR=/tmp \ --env=HOME=/pulQFx \ --cidfile=/tmp/6oymek_x/20210816072226-066503.cid \ quay.io/biocontainers/fastqc:0.11.9--0 \ fastqc \ -o \ . \ --threads \ 2 \ /var/lib/cwl/stgb4cec480-504d-44b3-b986-742de874a62f/ERR034597_2.small.fq.gz > /tmp/sho17x8u/fastqc-stdout.log 2> /tmp/sho17x8u/fastqc-stderr.log INFO [job qc_2] Max memory used: 3740MiB INFO [job qc_2] completed success INFO [step qc_2] completed success INFO [workflow ] completed success { "qc_result_1": { "location": "file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small_fastqc.html", "basename": "ERR034597_1.small_fastqc.html", "class": "File", "checksum": "sha1$3f61001342c78fa8d3b8c5c4c629f9a25c121630", "size": 592394, "path": "/home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small_fastqc.html" }, "qc_result_2": { "location": "file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_2.small_fastqc.html", "basename": "ERR034597_2.small_fastqc.html", "class": "File", "checksum": "sha1$788f1cc1fd236028c6bb87e76424df5cdb5bafb8", "size": 592566, "path": "/home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_2.small_fastqc.html" }, "trimmed_fastq1P": { "location": "file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.1P.fq", "basename": "ERR034597_1.small.fq.trimmed.1P.fq", "class": "File", "checksum": "sha1$5188cdb59cab8010eb673e8bc113b7fd7a686660", "size": 5566650, "path": "/home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.1P.fq" }, "trimmed_fastq1U": { "location": "file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.1U.fq", "basename": "ERR034597_1.small.fq.trimmed.1U.fq", "class": "File", "checksum": "sha1$be4d3444537d2596d122db1ca8e5955954094f6b", "size": 187289, "path": "/home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.1U.fq" }, "trimmed_fastq2P": { "location": "file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.2P.fq", "basename": "ERR034597_1.small.fq.trimmed.2P.fq", "class": "File", "checksum": "sha1$cd1451093c91a9b619337a7bfbe592ad76554745", "size": 5560582, "path": "/home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.2P.fq" }, "trimmed_fastq2U": { "location": "file:///home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.2U.fq", "basename": "ERR034597_1.small.fq.trimmed.2U.fq", "class": "File", "checksum": "sha1$dd7edf1b2d599eb3c8fa49426be55d8a0360561c", "size": 80131, "path": "/home/ubuntu/sandbox/rootless/sapporo_test_workflows/results/qc_and_trimming/cwl/ERR034597_1.small.fq.trimmed.2U.fq" } } INFO Final process status is success ``` - [TODO] Sapporo の実験 - https://github.com/ddbj/sapporo-service - https://github.com/ddbj/sapporo/blob/master/docs/GettingStarted.md - 動いた ``` $ git clone git@github.com:ddbj/sapporo-service.git $ cd sapporo-service # docker-compose.yml の docker sock を編集する # /var/run/docker.sock:/var/run/docker.sock を /run/user/1000/docker.sock:/var/run/docker.sock にする $ docker-compose up -d $ curl -s localhost:1122/service-info | jq . { "auth_instructions_url": "https://github.com/ddbj/sapporo-service", "contact_info_url": "https://github.com/ddbj/sapporo-service", "default_workflow_engine_parameters": [], "executable_workflows": [ { "workflow_attachment": [ { "file_name": "trimming_and_qc.cwl", ... # 動いている $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5030f83f9f50 ghcr.io/ddbj/sapporo-service:1.0.14 "tini -- uwsgi --yam…" 31 seconds ago Up 28 seconds 0.0.0.0:1122->1122/tcp sapporo-service $ SAPPORO_HOST=0.0.0.0 SAPPORO_PORT=1122 bash tests/curl_example/post_runs/cwltool/remote_workflow/post_runs.sh {"run_id":"ab3a3470-47c6-47bf-9911-90369e4a916c"} $ curl -s localhost:1122/runs/ab3a3470-47c6-47bf-9911-90369e4a916c | jq . { "outputs": null, "request": { "tags": "{}", "workflow_attachment": [], "workflow_engine_name": "cwltool", "workflow_engine_parameters": "{}", "workflow_name": "trimming_and_qc_remote.cwl", "workflow_params": "{\n \"fastq_1\": {\n \"class\": \"File\",\n \"location\": \"https://raw.githubusercontent.com/ddbj/sapporo-service/master/tests/resources/cwltool/ERR034597_1.small.fq.gz\"\n },\n \"fastq_2\": {\n \"class\": \"File\",\n \"location\": \"https://raw.githubusercontent.com/ddbj/sapporo-service/master/tests/resources/cwltool/ERR034597_2.small.fq.gz\"\n }\n}\n", "workflow_type": "CWL", "workflow_type_version": "v1.0", "workflow_url": "https://raw.githubusercontent.com/ddbj/sapporo-service/master/tests/resources/cwltool/trimming_and_qc_remote.cwl" }, ... ``` - そういえば vscode-textlint と vscode copilot よい - https://efcl.info/2015/09/10/introduce-textlint/ - https://shanaiho.smarthr.co.jp/n/n881866630eda ### 那須野 - https://docs.docker.com/engine/security/rootless/ - docker-ce (v20.10.x) 導入済み環境なら、一般ユーザ権限で `dockerd-rootless-setuptool.sh install` を実行して、 - `dockerd-rootless.sh` で起動すればOK - OSディストリビューションによっては、別途 User-mode Network namespace のためのツールが必要 (Ubuntu 18.04 は [slirp4netns](https://github.com/rootless-containers/slirp4netns) が必要だった) - Docker-in−Docker は `docker:dind-rootless` イメージを使えと書いてあったが、エラーで起動できず... `newuidmap` 周り? - 普通に使う分には問題なさそう。 - port公開 ... 特権ポート以外ならOK。 - volume ... 基本的に rootlesskit を起動したユーザ権限でしか動かないので、コンテナ内で root で書き込んでも volume マウントした先のホスト上のファイルオーナー、パーミッションはそのユーザになるだけ。 - 引き続き、ひたすら K8s 検証 - Container Orchestrator の拡張を目的とした比較のために Hashicorp Nomad も並行して検証 - スマートウォッチでの SpO2 測定 - せっかく買ったので息止めてがんばってみたけど、93% が限界だった…。 ### 丹生 - [hail](https://hail.is/) と格闘中 - 入力がおかしくないのは確認 (遺伝研スパコンにある入力ファイルのチェックサムはオリジナルと一致) - 入力数: 100 までは動く。101 以降は動かない。 - [branch factor](https://hail.is/docs/0.2/experimental/vcf_combiner.html#pipeline-structure) を疑っている (デフォルト値が100) - 確認中 - ep3 をいじるための [schema salad](https://www.commonwl.org/v1.2/SchemaSalad.html) 処理系[再実装](https://github.com/tom-tan/schema-salad-d)中 - [JsonldPredicate](https://www.commonwl.org/v1.2/SchemaSalad.html#JsonldPredicate) にすべてのカオスが詰め込まれていることに気付き始めた - [Document Preprocessing](https://www.commonwl.org/v1.2/SchemaSalad.html#Document_preprocessing) のほぼ全てに絡んでいる - [schema salad の metaschema](https://github.com/common-workflow-language/schema_salad/blob/main/schema_salad/metaschema/metaschema.yml) は本当にテストされてるのか…? - 変な場所に `typeDSL` が付けられている - 長期的なブロッカーを倒すためにコンパイラの中の人を[突っついた](https://github.com/dlang/dmd/pull/12514#issuecomment-898904026) - 最終的にコンパイル時に動くコンパイラコンパイラ的なものを作りたい ### 石井 - Singularityでsapporo-webをたてようとすると、tiniがらみのエラーがでるのですが、解決策ご存知の方いらっっしゃいますでしょうか? - rootless dockerで解決となるかもしれない。 - PID 1 問題用にお作法的に、tiniつかっているだけなので、対応できるのは、なしにしてよい、docker-compose.yaml のバージョンをあげるという手もある。 - docker-compose とdocker compose (サブコマンド)の違いは非推奨のものの扱い程度だけの模様。(おおたさん) - snakemakeのワークフローで、一部のファイルが更新された場合、それに関連するものだけ再実行してくれる機能が「意図通りに」動いてくれると感激するという知見を最近得ました。 - ただしそれが意図通りなのかを把握するのは、初回実行時などは大変かもしれない。 - cwltoolのcacheオプションも似たような動き - CWL - ワークフロー実行した後の、outputディレクトリをIDごとに作りたいということがあり、これを簡単に実行する方法をさがすか迷っていた。 - さがさなかった。 - あるならぜひ教えていただきたいです :bow: - toilを複数起動するということにした。 - 池田さんのところに剣連した参考情報(石井):ResourceRequirements の値を、Javascript?Parameter?で指定することもの可能。 - 全然別件 - 時間がかかる処理が複数あり、コードがこなれていないときは、いくつか停止と起動を行えるポイントをつくっておくとよい。

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully