Category : uvicorn

I design a classification model using Python=3.9.5, Keras=2.4.3 and tensorflow-cpu=2.5.0. The model works fine in the Windows development environment, but when I deploy it to server using Docker, FastAPI and uvicorn. It is stuck at random while adding the first layer. Sometime this error occurs on training for 4th time or sometimes it occurs after ..

Read more

I’m running a FastAPI with unicorn on port 5000 and all is fine until I put it inside a Docker container. Here is the code: from typing import Optional import uvicorn from fastapi import FastAPI app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Optional[str] = None): return {"item_id": item_id, ..

Read more

I have FastAPI (Python) with uvicorn[standard]. And I have this error: error walking file system: OSError [Errno 40] Too many levels of symbolic links: ‘/sys/class/vtconsole/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0/subsystem/vtcon0’ If I use just uvicorn, everything is okay, but I need uvicorn[standard]. How to fix it? I use it in Docker. Source: Docker..

Read more

I have a docker container running with my scripts,My project structure is : project │ └─── Dockerfile │ └─── src │ └ ───app │ │___ main.py │ │___ init_.py │───routers └───logs have enabled python’s native logging module: # src/routers/api_resources.py logging.basicConfig(filename=’./logs/info.log’,level=logging.INFO, filemode=’a’, format=’%(asctime)s :: %(levelname)s :: %(message)s’) This is my dockerfile : `FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7 COPY ./src/ ..

Read more