You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst I can build and run the ready-made Docker image, as per the projects README, I cannot build the Dockerfile locally without some kind of incompatible requirements error.
To Reproduce
Attempt to build the project's Dockerfile. A sample of the console output:
...
#7 94.43 ERROR: lexnlp 2.0.0 has requirement joblib==0.14.0, but you'll have joblib 1.1.0 which is incompatible.
#7 94.43 ERROR: lexnlp 2.0.0 has requirement nltk==3.5, but you'll have nltk 3.6.2 which is incompatible.
#7 94.43 ERROR: lexnlp 2.0.0 has requirement numpy==1.19.1, but you'll have numpy 1.19.5 which is incompatible.
#7 94.43 ERROR: lexnlp 2.0.0 has requirement pandas==1.1.3, but you'll have pandas 1.1.5 which is incompatible.
#7 94.43 ERROR: lexnlp 2.0.0 has requirement regex==2020.11.13, but you'll have regex 2022.3.15 which is incompatible.
#7 94.43 ERROR: lexnlp 2.0.0 has requirement requests==2.24.0, but you'll have requests 2.27.1 which is incompatible.
...
I've chopped and changed versions and wrangled the order of what gets installed as much as I can, but I just cant get them to work together. My suspicion is that because libraries like Pandas and Numpy use C-extensions, there is an added layer of complexity here. I've even tried running a linux container and installing Python and all the C dependancies needed from scratch, but to no avail, I always come up against this dependancy hell!
Current Workaround
Given that there are fewer endpoints dependant on Blackstone, I've just stripped Blackstone out of my branch. This loses me the 'abbreviation' , 'legislation' and 'named-entity' endpoints, but means I can reliably build and run the container.
FROM python:3.6.8
ENV SPACY_MODEL=en_core_web_sm
COPY requirements-all-but-black.txt .
RUN pip install -r requirements-all-but-black.txt
EXPOSE 80
COPY ./app /app
CMD ["python", "/app/main.py"]
Possible resolutions
If someone knows the trick to getting blackstone, lexnlp and all of their dependancies installed and running within the same Docker container, please let me know!
Introduce Docker Compose and run a blackstone based service in its own container. The main fast-api app could consume endpoints from there, when it requires the functionality provided by blackstone.
The text was updated successfully, but these errors were encountered:
Hey @pj-simpson - glad to see you here, albeit I didn't see this issue when it was originally raised many months ago! I'll certainly take a look as why a fresh creation isn't recreating the rebuilt container as I'd expect to run into the exact same issue.
@pj-simpson I think with this issue, I'll resolve it in the same way you have - I'll remove the blackstone references and build a separate module to perform legislation extraction from text.
@pj-simpson and you too! Also, removal of blackstone and adding legislation replacement gets it down from 6gb to 1.5gb image and 150mb RAM usage on load so not bad at all!
Description
Whilst I can build and run the ready-made Docker image, as per the projects README, I cannot build the Dockerfile locally without some kind of incompatible requirements error.
To Reproduce
Attempt to build the project's Dockerfile. A sample of the console output:
I've chopped and changed versions and wrangled the order of what gets installed as much as I can, but I just cant get them to work together. My suspicion is that because libraries like Pandas and Numpy use C-extensions, there is an added layer of complexity here. I've even tried running a linux container and installing Python and all the C dependancies needed from scratch, but to no avail, I always come up against this dependancy hell!
Current Workaround
Given that there are fewer endpoints dependant on Blackstone, I've just stripped Blackstone out of my branch. This loses me the 'abbreviation' , 'legislation' and 'named-entity' endpoints, but means I can reliably build and run the container.
my requirements.txt post-removing blackstone
Dockerfile
Possible resolutions
The text was updated successfully, but these errors were encountered: