Category : flask

please see this link to see the folder structure: https://drive.google.com/file/d/1KceimcgGMN68Z0gDet2G6SzZIQUhkQ2G/view?usp=sharing Hi, I am having issue with running my flask app on docker container, please help. this is the Dockerfile code: from alpine:latest RUN apk add –no-cache python3.9.7-dev && apk add –no-cache py3-pip && pip install –upgrade pip WORKDIR /NewBackend COPY . /NewBackend RUN pip3 –no-cache-dir ..

Read more

I am trying to use connexion/Flask to return a base64-encoded image generated by PIL/pillow in a HTTP Response. Having upgraded to python3.7 from python2.7, that part of the code works unaltered. However, when running inside Docker (python3.7-slim), I get the time-honoured TypeError: Object of type bytes is not JSON serializable (full Traceback below). The encoding ..

Read more

I have created a flask api and hosted it as a docker image. The dockerfile of the image looks like this: FROM pymesh/pymesh:latest WORKDIR /apiapp RUN pip install flask EXPOSE 5000 COPY . /apiapp ENV FLASK_APP=feature_extract_api.py # ENTRYPOINT [‘/bin/bash’] CMD ["flask", "run", "–host", "0.0.0.0"] The app.run() inside the original python file looks like this: if ..

Read more