Code Monkey home page Code Monkey logo

Comments (9)

bdevans avatar bdevans commented on June 12, 2024 1

Yes, I agree. I tend to write an external requirements.txt which is read as part of the docker build process but also available for other types of use. Ultimately, as long as scripts and requirements are under version control in the same repository that goes a long way to making it reproducible but I think it would be better to either include scripts at build time as a (custom) software dependency.

from ten-simple-rules-dockerfiles.

bdevans avatar bdevans commented on June 12, 2024 1

Yes that's right. I'll start a new PR as I think it would have been too much to digest in one go otherwise and merging with parallel PRs would have been a nightmare!

from ten-simple-rules-dockerfiles.

vsoch avatar vsoch commented on June 12, 2024

The (unsaid) distinction I think is for a container intended to be used solely for an interactive environment, for which you'd mount a script at runtime. This is one of the rules I don't agree with 0 I personally think for both cases scripts should be included in containers, and actually the user should err on the side of caution and include all the scripts they need, and only leave out data that is so huge it would be infeasible. Why? Because mounting is not reproducible, and for the most part we are writing about the use case of containers that go along with published work. For where the versions get written, in the Dockerfile or a requirements.txt (or similar) file is fine as long as it's included in the container.

from ten-simple-rules-dockerfiles.

vsoch avatar vsoch commented on June 12, 2024

This was already brought up as a concern too: https://twitter.com/iancal/status/1251294579606896643?s=21

from ten-simple-rules-dockerfiles.

bdevans avatar bdevans commented on June 12, 2024

I hadn't seen that but yes, I agree. If you've ever used sumatra a project management tool, it refuses to let you run uncommitted code as a solution to the problem mentioned in the tweet. In our case, including the script at (the end of) the build process is a simpler and more natural solution (as implied by the tweet).

from ten-simple-rules-dockerfiles.

nuest avatar nuest commented on June 12, 2024

Just had a chat with @bdevans about this, here's my take:

  • 👍 to present options "within Dockerfile" and requirements.txt, and mention advantages of both > no strict rule
  • Change Rule 7 to focus on Data only, and preserve only the "scripts + Dockerfile should be in same repo" but move that to the old rule 9, the new rule "Use version control".
    • suggest to try to say in two sentences that you can mount (e.g. if using Jupyter container) or copy (e.g. if running the image only via CLI)

from ten-simple-rules-dockerfiles.

nuest avatar nuest commented on June 12, 2024

@bdevans #79 only partially covers this issue, right?

from ten-simple-rules-dockerfiles.

bdevans avatar bdevans commented on June 12, 2024

@nuest what did I miss?

from ten-simple-rules-dockerfiles.

nuest avatar nuest commented on June 12, 2024

@bdevans Never mind, I was confused because of the "old rule 9", but the rule reordering was not part of the PR yet. I assume you'll start another PR for that (good call on going smaller PRs btw).

from ten-simple-rules-dockerfiles.

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.