PIbd-32_Kashin_M.I_API_Cour.../README.md

59 lines
2.8 KiB
Markdown
Raw Normal View History

<EFBFBD><EFBFBD>## @54C?@5645=85
A;8 C 20A Python 3.9 8;8 =865, 70<5=8B5 `<B8?1> | <B8?2>` =0 `Union[<B8?1>, <B8?2>]`
## !>740=85 @5?>78B>@8O
```
git init
git remote add origin git@github.com:<=8:=59<>/<=0720=85 5?>78B>@8O>.git
.... add gitignore
git add .
git commit -m "..."
git branch -M main
git push -u origin main
```
## >43>B>2:0 A5@25@0
### git
```
sudo apt-get update
sudo apt-get install git
```
### docker
>6=> 2>A?>;L7>20BLAO 8=AB@C:F859: https://docs.docker.com/engine/install/ubuntu/
8;8 A:>?8@>20BL :>4 =865
```
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
### 0?CA: ?@8;>65=8O
!>740=85 >1@070 (:>@>1:8) A ?@8;>65=85<
```
docker build . --tag fastapi_app
```
0?CA: >1@070 2 :>=B59=5@5 A ?@>1@>A>< ?>@B>2 4;O 4>ABC?0 : :>=B59=5@C 87 8=B5@=5B0
```
docker run -p 80:80 fastapi_app
```