rest-api-server / README.md
mattoofahaddcube's picture
reame update
d3a36c5
metadata
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

    conda create -n rest_server python=3.10 -y
    
  2. Activate env

    conda activate rest_server
    
  3. Install the required Python packages:

    pip install -r requirements.txt
    
  4. Run the local server:

    uvicorn main:app --host 0.0.0.0 --port 5000
    

Docker

  1. Create the docker container

    docker build -t rest-server .
    
  2. run the container

    docker run -p 7860:7860 rest-server