Code Monkey home page Code Monkey logo

Comments (6)

jjtolton avatar jjtolton commented on July 22, 2024

When you run your python command with the same arguments, what do you get for import numpy?

from libpython-clj.

jjtolton avatar jjtolton commented on July 22, 2024

Where I'm going with this is we can do a little more work to specify the correct Python environment, whichever is being pointed to does not have numpy installed.

from libpython-clj.

metasoarous avatar metasoarous commented on July 22, 2024

Ah! Thanks so much! You're suggestion of testing import numpy from python led to the issue.

Turns out that calling

SHELL ["conda", "run", "-n", "pyclj", "/bin/bash", "-c"] 

from the Dockerfile does apply the specified conda environment (pyclj in this case) to all subsequent RUN commands, but not to the final CMD 😆 Took me a minute to figure out, but simply calling

CMD ["conda", "run", "-n", "pyclj", "clojure", "-M:cider-nrepl"]

did the trick here.

Will update that repo tomorrow as an example of how to use libpython-clj + conda + docker together in case its useful for others to point to.

Thanks again!

from libpython-clj.

jjtolton avatar jjtolton commented on July 22, 2024

Great catch! You got that quick, those container issues can be a nightmare.

from libpython-clj.

metasoarous avatar metasoarous commented on July 22, 2024

Yes indeed; Worth noting that I got to this point after debugging about a half dozen other issues since the last time I had a working thing 🤦

FWIW, I just updated the repo with the fix and some documentation to make it clearer what's going on. You're welcome to merge it into your examples repository or point to it from somewhere if you like.

https://github.com/metasoarous/libpython-clj-conda-docker

Thanks again!

from libpython-clj.

jjtolton avatar jjtolton commented on July 22, 2024

Much appreciated. Yes, the example repo is overdue for an overhaul.

from libpython-clj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.