{"id":21320432,"url":"https://github.com/kurusugawa-computer/interface-2023-11-chatgpt","last_synced_at":"2025-07-12T04:32:47.431Z","repository":{"id":195766122,"uuid":"690982521","full_name":"kurusugawa-computer/interface-2023-11-chatgpt","owner":"kurusugawa-computer","description":"Interface 2023年11月号の中西担当分のソースコード・ログのリポジトリです。","archived":false,"fork":false,"pushed_at":"2023-09-21T06:33:18.000Z","size":1757,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-19T21:22:31.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kurusugawa-computer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-13T09:14:31.000Z","updated_at":"2023-10-22T07:38:01.000Z","dependencies_parsed_at":"2023-09-19T13:58:18.066Z","dependency_job_id":null,"html_url":"https://github.com/kurusugawa-computer/interface-2023-11-chatgpt","commit_stats":null,"previous_names":["kurusugawa-computer/interface-2023-11-chatgpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Finterface-2023-11-chatgpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Finterface-2023-11-chatgpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Finterface-2023-11-chatgpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Finterface-2023-11-chatgpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kurusugawa-computer","download_url":"https://codeload.github.com/kurusugawa-computer/interface-2023-11-chatgpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225795392,"owners_count":17525316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T19:47:49.999Z","updated_at":"2024-11-21T19:47:51.283Z","avatar_url":"https://github.com/kurusugawa-computer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interface 2023年11月号「ChatGPTとプログラミング」中西担当部分サポートページ\n\n\n## 概要\nこのリポジトリには、Interface 2023年11月号の「ChatGPTとプログラミング」（以下、本誌）の中西が担当した部分のサポートページです。\n以下の内容が含まれます。\n* 各章・コラムのChatGPTとのやり取り全文([./prompts/](./prompts))\n* 第3部第6章の認識サーバーのソースコード([./app](./app))\n* 第3部第6章の認識サーバー用のDocker関係ファイル([./docker](./docker))\n\n不備があれば、イシューぺージを活用ください。\n\n## 正誤表\n```\nイントロダクションのViTの全文のURL部分\n（誤）https://github.com/kurusugawa-computer/interface-2023-11-chatgpt/prompts/イントロダクション/ViT.md\n（正）https://github.com/kurusugawa-computer/interface-2023-11-chatgpt/blob/main/prompts/イントロダクション/ViT.md\n\n「プログラマ向け 活用テクニック13」のログ・ディレクトリのURL部分\n（誤）https://github.com/kurusugawacomputer/interface-2023-11-chatgpt/prompts/各論編\n（正）https://github.com/kurusugawa-computer/interface-2023-11-chatgpt/blob/main/prompts/各論編\n```\n\n\n## 認識サーバー利用方法\n認識サーバーの動作にはdockerを用います。\n\n[./app/launch.sh](./app/launch.sh)を用いてコンテナを起動し、そこで認識サーバーのAPIサーバープロセスや推論プロセスを動作させてます。\n\n認識サーバーは適切なGPU環境が必要です(OS:Linux, CPU:x86-64, NVIDIA製GPU, docker, NVIDIAドライバー, NVIDIA Container Toolkit)。\n詳細は本誌を確認ください。\n\n### ソースのダウンロード\nこのリポジトリをダウンロードします。\n```\n$ git clone https://github.com/kurusugawa-computer/interface-2023-11-chatgpt\n$ cd interface-2023-11-chatgpt\n```\n\n### Dockerコンテナ起動単体\nDockerコンテナを起動します。初回実行時はダウンロードに時間がかかります。\n```\n$ bash ./app/launch.sh\n```\n\n起動時にappディレクトリをコンテナにマウントします。\n\n### APIサーバープロセス\nコンテナを起動し、コンテナ内でuvicornコマンドでAPIサーバープロセスを起動します。\n\n```\n$ bash ./app/launch.sh\n$ uvicorn server:app \\\n（--port ポート番号（指定しない場合8000））\n（--host ローカルIPアドレス等を指定）\n```\n\n別PCなどの外部からアクセスする場合は、本誌で説明したように、引数（host,post）を適切に指定してください。\n\n### 推論プロセス\nコンテナを起動し、推論プロセスを起動します。複数起動しない想定です。\n\n```\n$ bash ./app/launch.sh\n$ python ./interface.py\n```\n\n## 他のスクリプト\n### app/test_model.py\n[./app/test_model.py](./app/test_model.py)は「ステップ1：推論コードの作成」で作成した推論コードをテストするコードです。\n以下のコマンドで実行します。実行すると推論結果が表示されます。\n\n```\n$ bash ./app/launch.sh\n$ python ./test_model.py\n```\n\n### app/repeat.sh\n[./app/repeat.sh](./app/repeat.sh)は「大量アクセス」の節のスクリプトです。環境に合わせてHOSTとPORTを変更して用いてください。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurusugawa-computer%2Finterface-2023-11-chatgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkurusugawa-computer%2Finterface-2023-11-chatgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurusugawa-computer%2Finterface-2023-11-chatgpt/lists"}