LoginSignup
0
3

More than 1 year has passed since last update.

streamlitを用いて開発したアプリをデプロイするまでの手順

Last updated at Posted at 2022-05-15

私が今勉強しているStreamlitで開発したアプリが簡単にデプロイすることができるようなのでここに記録としてやり方を残しておきます。

前準備

①作成したアプリのフォルダの中にrequirements.txtファイルを作成し、その中に使用している外部ライブラリを記入(streamlitなど)
※この際、外部ライブラリのバージョンを指定してあげる必要がある
例:streamlit==1.3.5
そのため、ターミナルでpip freezeと入力して使用している外部ライブラリのバージョンを確認する

②Githubでリポジトリを作成する
GithubのホームからNewボタンを押して新しいリポジトリを作成する

③ターミナルを開いて以下のコマンドを入力していく

git init //gitの初期化
git remote add origin Githubで作成したリポジトリのURL.git//リモートリポジトリとローカルを紐づける
git add .
git commit -m "first commmit"
git push origin master //アプリがGithubにプッシュされる

アプリのデプロイ

streamlitのHPを開く
②下にスクロールすると出てくる「Deploy instantly」のAll for free!をクリック→そのまま次のページで出てくるGet Startedボタンをクリック
スクリーンショット (85).png
③NewAppボタンをクリックして、
スクリーンショット 2022-05-15 203927.png
Repository:Githubで作成したリポジトリ
Branch:Master
Main file path:アプリを実行するときに使うファイル名
これらを選択。

④デプロイボタンを押して終了!

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3