I was expecting a docker image that could be deployed. But while creating the docker image I got the error mentioned in the post. Then I tried to create a docker image to deploy the application. I have run my application using gunicorn with no error. What could be the problem? Thank you in advance. The command '/bin/sh -c pip install flask transformers optimum gunicorn' returned a non-zero code: 1 Note: This error originates from a subprocess, and is likely not a problem with pip. Return self._get_build_requires(config_settings, requirements=)įile "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 320, in _get_build_requiresįile "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 482, in run_setupįile "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 335, in run_setupĪssertionError: Error: Could not open 'optimum/version.py' due No such file or directory: 'optimum/version.py' app WORKDIR /app RUN pip install -r requirements.txt ENTRYPOINT. Change to version 18.04 and it will work: FROM ubuntu:18.04 RUN apt-get update -y RUN apt-get install -y python-pip python-dev build-essential COPY. Json_out = hook(**hook_input)įile "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheelįile "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel Im suspecting the first line in Dockerfile tries to use the latest Ubuntu version 20.04, that doesnt have the package. × Getting requirements to build wheel did not run successfully.įileNotFoundError: No such file or directory: 'optimum/version.py'ĭuring handling of the above exception, another exception occurred:įile "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in įile "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main Getting requirements to build wheel: finished with status 'error' Preparing metadata (pyproject.toml): finished with status 'done' Preparing metadata (pyproject.toml): started Getting requirements to build wheel: finished with status 'done' Getting requirements to build wheel: started Installing build dependencies: finished with status 'done' The error as follows: Downloading optimum-0.1.2-p圓-none-any.whl (33 kB) #Exposing the port 5000 from the containerĮNTRYPOINT īut I get some errors while executing the following command: sudo docker build -t sentiment-analysis:v001. ![]() ![]() # Copy the models directory and app.py files RUN pip install flask transformers optimum gunicorn ![]() I have the dockerfile as below: #Using the base image with python I was trying to create a docker image for a sentiment analysis application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |