kanhaiya lal bohra
can't access fast api
chat gpt create this is this is right?
Use an official Python runtime as a parent image
FROM python:3.11
Set the working directory in the container
WORKDIR /usr/src/app
Copy the current directory contents into the container at /usr/src/app
COPY . .
Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
Make port 80 available to the world outside this container
EXPOSE 80
Define environment variable
ENV NAME World
Run main.py when the container launches
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
23 replies
can't access fast api
now its crashed
File "/opt/venv/lib/python3.11/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.nix-profile/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
23 replies