Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/test
*test*
*lock
*crt
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[workspace]


members = [ "all_sample_hamming_dist", "all_sample_nt_diffs",
"mutations_of_interest_table", "plots", "check_chemistry",
]

[workspace.dependencies]
clap = { version = "4", features = ["derive"] }
Expand All @@ -11,4 +11,7 @@ either = "1"
zoe = { version = "0.0.19", default-features = false, features = [
"multiversion",
] }

[profile.release]
strip = true
csv = "1.3.1"
61 changes: 61 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Create an argument to pull a particular version of an image

####################################################################################################
# BASE IMAGE
####################################################################################################
FROM rustlang/rust:nightly-alpine AS builder


# Required certs for apk update
COPY ca.crt /root/ca.crt

# Put certs in /etc/ssl/certs location
RUN cat /root/ca.crt >> /etc/ssl/certs/ca-certificates.crt

RUN apk update && apk add --no-cache build-base


WORKDIR /app

# Copy all scripts to docker images
COPY . .

# This build step will cache the dependencies
RUN cargo build --release


FROM alpine:latest as deploy

# May only be required for WSL.
# Required certs for apk update
COPY ca.crt /root/ca.crt

# Put certs in /etc/ssl/certs location
RUN cat /root/ca.crt >> /etc/ssl/certs/ca-certificates.crt

# Install system libraries of general use
RUN apk update && apk add --no-cache \
bash \
&& rm -rf /var/lib/{apt,dpkg,cache,log} \
&& rm /root/ca.crt

WORKDIR /app

COPY --from=builder \
/app/target/release/mutations_of_interest_table \
/app/target/release/all_sample_nt_diffs \
/app/target/release/all_sample_hamming_dist \
/app/target/release/plots \
/app/target/release/check_chemistry /app/

# Create working directory variable
ENV WORKDIR=/data

# Set up volume directory in docker
VOLUME ${WORKDIR}

# Set up working directory in docker
WORKDIR ${WORKDIR}

# Export project directory to PATH
ENV PATH "$PATH:/app"
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
x-rust-image: &rust-image mira-oxide/rust-nightly

x-data-volume: &data-volume
type: bind
source: /home/xpa3/mira-oxide/test
target: /data

services:
mira-oxide:
container_name: mira-oxide
image: mira-oxide:latest
build:
context: .
dockerfile: Dockerfile
restart: always
volumes:
- *data-volume
command: tail -f /dev/null
Loading