Spaces:
Running
Running
File size: 678 Bytes
ef1dd9e 3ac85c9 ef1dd9e 3ac85c9 ef1dd9e 3ac85c9 ef1dd9e 3ac85c9 ef1dd9e 4118340 ef1dd9e d3a36c5 ef1dd9e 4118340 ef1dd9e 4118340 ef1dd9e 4118340 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
---
title: This a fastapi middleware.
colorFrom: blue
colorTo: yellow
emoji: ππ
sdk: docker
app_file: main.py
pinned: false
---
## Installation and Usage
1. Create conda env
```bash
conda create -n rest_server python=3.10 -y
```
2. Activate env
```bash
conda activate rest_server
```
3. Install the required Python packages:
```bash
pip install -r requirements.txt
```
3. Run the local server:
```bash
uvicorn main:app --host 0.0.0.0 --port 5000
```
## Docker
1. Create the docker container
```bash
docker build -t rest-server .
```
2. run the container
```bash
docker run -p 7860:7860 rest-server
``` |