Spaces:
Sleeping
Sleeping
metadata
title: This a fastapi middleware.
colorFrom: blue
colorTo: yellow
emoji: ππ
sdk: docker
app_file: main.py
pinned: false
Installation and Usage
Create conda env
conda create -n rest_server python=3.10 -y
Activate env
conda activate rest_server
Install the required Python packages:
pip install -r requirements.txt
Run the local server:
uvicorn main:app --host 0.0.0.0 --port 5000
Docker
Create the docker container
docker build -t rest-server .
run the container
docker run -p 7860:7860 rest-server