mirror of
https://github.com/alvierahman90/mandrake.git
synced 2024-12-15 12:21:59 +00:00
create readme
This commit is contained in:
parent
0880eee6ee
commit
17137be4a1
19
Dockerfile-example
Normal file
19
Dockerfile-example
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM ubuntu:latest
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive TZ=Europe/London \
|
||||||
|
apt install -y pandoc make texlive texlive-latex-extra texlive-fonts-extra gpg curl npm python3-pip
|
||||||
|
RUN pip install matplotlib
|
||||||
|
RUN curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg \
|
||||||
|
&& install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg \
|
||||||
|
&& gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 \
|
||||||
|
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list \
|
||||||
|
&& apt update && DEBIAN_FRONTEND=noninteractive TZ=Europe/London apt install -y conda
|
||||||
|
RUN export PATH=/opt/conda/bin:$PATH \
|
||||||
|
&& conda install -y -c conda-forge pandoc-plot
|
||||||
|
RUN npm install --global mermaid-filter
|
||||||
|
|
||||||
|
ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /context
|
@ -5,22 +5,6 @@ try-multiple = false
|
|||||||
run-local = true
|
run-local = true
|
||||||
output = "out"
|
output = "out"
|
||||||
|
|
||||||
[[remotes]]
|
|
||||||
name = "a2"
|
|
||||||
host = "alvps2"
|
|
||||||
default = false
|
|
||||||
|
|
||||||
[remotes.ssh]
|
|
||||||
host = "alvps2"
|
|
||||||
|
|
||||||
[[remotes]]
|
|
||||||
name = "gareth"
|
|
||||||
host = "http://gareth:5000"
|
|
||||||
default = false
|
|
||||||
|
|
||||||
[remotes.ssh]
|
|
||||||
host = "gareth"
|
|
||||||
|
|
||||||
[[remotes]]
|
[[remotes]]
|
||||||
name = "local"
|
name = "local"
|
||||||
host = "http://localhost:5000"
|
host = "http://localhost:5000"
|
||||||
|
21
readme.md
Normal file
21
readme.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# 🍃 mandrake
|
||||||
|
|
||||||
|
> (Proof of concept) run commands in remote docker container to offload compute intensive commands
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Create `config-server.toml`.
|
||||||
|
See [`config-servre.toml`](./config-server.toml) for an example.
|
||||||
|
1. Start `mandrake-server.py`
|
||||||
|
1. Create `Mandrake.toml` file in root directory of project.
|
||||||
|
See [`Mandrake.toml`](Mandrake.toml) for an example.
|
||||||
|
1. Create a `Dockerfile` in the root directory of project to specify the environment to
|
||||||
|
execute the command.
|
||||||
|
See [`Dockerfile-example`](Dockerfile-example) for an example.
|
||||||
|
|
||||||
|
Remember to the working directory to `/context`.
|
||||||
|
|
||||||
|
1. Run `mandrake-server.py <command> [arg1 [arg2 [...]]]` in the project directory,
|
||||||
|
where `<command>` and `[argN]` the command and its arguments to run in the docker
|
||||||
|
container.
|
Loading…
Reference in New Issue
Block a user