dmolitor / tugboat Goto Github PK
View Code? Open in Web Editor NEWA tool for quickly generating a Docker image from a directory.
A tool for quickly generating a Docker image from a directory.
To allow the user to specify R, Python, etc. dependencies at build time, the auto-generated Dockerfile currently relies on installing a super-comprehensive list of system dependencies via apt-get install
and hoping that all bases are covered. For obvious reasons this is a clunky, inefficient way of handling system dependencies; could Nix be the answer? Idk, but it seems promising... ๐ค
Currently installing Python with mamba. However, specifying a specific Python version, e.g. 3.10.3, sometimes causes the mamba install to fail.
Issue
The current Python in the generated Dockerfile looks like
ENV PYTHON_VERSION=3.10.3
...
RUN ... && \
mamba install -y python=${PYTHON_VERSION} && \
...
This fails at the mamba install -y python ...
step because apparently mamba can't find that specific version.
Solution
My temporary(?) solution to this is to fall back to the latest available major version if the specific version installation fails. E.g. in this case we would fall back to installing Python 3.10 when 3.10.3 fails. The updated Dockerfile will look like the above with a couple small changes:
ENV PYTHON_VERSION=3.10.3
ENV PYTHON_MAJOR_VERSION=3.10
...
RUN ... && \
mamba install -y python=${PYTHON_VERSION} || \
mamba install -y python=${PYTHON_MAJOR_VERSION}
...
In the mid/long-run I don't want this in Python. The goal is to do what it says...translate this into Go.
Currently the Docker image is built for whatever platform it's being built on. By default we should be doing multi-arch builds when possible. For example, we should automatically be building for linux/amd64
and linux/arm64
platforms (and perhaps some others?) when possible.
Note Since currently Stata must be built/run with the --platform linux/amd64
flag, we should only do multi-arch builds when Stata is not included in the image.
Installing Stata in the Docker container may be a challenge.
Main problems
Other stuff may pop up. Will update this thread as I progress...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.