Coder Social home page Coder Social logo

Dockerfile about partis HOT 10 OPEN

ashotmarg avatar ashotmarg commented on July 17, 2024
Dockerfile

from partis.

Comments (10)

KasapovicS avatar KasapovicS commented on July 17, 2024 1

You could build an image yourself for each version you release and push it somewhere. Like dockerhub.

from partis.

psathyrella avatar psathyrella commented on July 17, 2024

Great! Sounds like an awesome addition.

I just rebuilt with the same command as you on my machine and it worked fine, so I'm guessing it's something nextflow-specific? I'm not familiar with it at all, but your output looks a bit different so I'm imagining the env is also different. It looks like the build script isn't correctly cd'ing into the ham dir for you, so I'm guessing the script dir variable isn't getting set correctly? It looks like I changed it to this weird/complicated way pretty recently so it'd work in the linearham build, but in retrospect it's a bit silly to make it bash dependent. Maybe you can figure out what shell you're in there and suggest something that'll work in both?

edit: although, the build script does have #!/bin/bash at the top, so seems like it ought to reliably be running bash.

p

from partis.

ashotmarg avatar ashotmarg commented on July 17, 2024

Thanks for the prompt feedback! It's not Nextflow dependent, as Nextflow just calls the docker (or conda, singularity...) container and runs it in pipelines and/or submit jobs... Actually, I already tried partis with Nextflow, and it works nicely with your already build image (quay.io/matsengrp/partis), so that part is fine.
What I did there, was to just run docker build, and (re)create your image, in order to play around with adding R and packages. I tried this on macOS Ventura, will try it on Linux as well, see if that helps.
Cheers!

from partis.

psathyrella avatar psathyrella commented on July 17, 2024

ah, ok, then sounds like a difference in the macos vs linux docker versions. If it's possible to suggest a fix that'd be great.

from partis.

KasapovicS avatar KasapovicS commented on July 17, 2024

When you do just the git clone on the repo the partis\packages\ham folder is empty.
This isnt the only one, there are many of them as this repository contains submodules, the entire repo should be ~550MB.
You should instead run

git clone --recursive https://github.com/psathyrella/partis.git

This populates all those folders and gets you the code for building the image.

from partis.

psathyrella avatar psathyrella commented on July 17, 2024

That's a great point, running the wrong git clone command would cause this error. Do you know why there would be a difference in this (maybe in the COPY behavior) in different docker versions, though?

from partis.

KasapovicS avatar KasapovicS commented on July 17, 2024

That's a great point, running the wrong git clone command would cause this error. Do you know why there would be a difference in this (maybe in the COPY behavior) in different docker versions, though?

COPY behavior is the same once docker build starts, that's kinda the point of docker. There are some differences though in the build process on new Macs.

This major difference happens on newer MacOS, due to different processor instructions. On an Intel/AMD Machine (even an older Mac), docker pull will pull the linux AMD64 image with FROM instruction or docker pull. On a newer Mac using M1/2 processor, docker pull will the pull the linux/arm64/v8 image. This different image might miss some stuff with installations, most notorious one being missing of gcc or the distro not having all python wheels.

But here we quite clearly have a file missing. I might be a bit over confident, because I got the same error as he did - when I cloned it wrong :). Regular clone will give you the ham folder, but it will be empty. Since there was nothing in the ham folder, the Sconstruct file was not found.

from partis.

psathyrella avatar psathyrella commented on July 17, 2024

Yes I think you're likely right that this is the issue. It seems absolutely wild to me that this kind of difference exists (like, isn't avoiding this the whole point of docker?). In any case, let me know if there's anything I can do to avoid it, otherwise I guess I can just put a not that it may not work on mac. I've tried setting submodule.recurse in the repo's .git/config, but i don't think there's a way for that to propagate.

from partis.

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.