Skip to content

Commit

Permalink
Move container related things into separate directory...
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesabbott committed May 24, 2023
1 parent 84f5ab0 commit 892f1a8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
9 changes: 0 additions & 9 deletions build_image.sh

This file was deleted.

6 changes: 2 additions & 4 deletions Dockerfile → containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Test build with: docker buildx build --platform linux/amd64 -t colabfold_batch:1.5.2 --load .

FROM condaforge/mambaforge

ENV CONDA_PREFIX=/opt/conda
ENV PATH /opt/conda/envs/colabfold_batch/bin:$PATH

COPY colabfold_batch.yaml .
COPY setup.sh .
COPY ../colabfold_batch.yaml .
COPY ../setup.sh .

RUN ./setup.sh && \
rm colabfold_batch.yaml setup.sh && \
Expand Down
15 changes: 15 additions & 0 deletions containers/build_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Builds a docker image with versioning extracted from yaml file
# This uses 'buildx' for a cross-platform build allowing it be be built on MacOS
# where we have Docker available, then the image can be transferred to the cluster
# and singuliarity used to create a .sif image.

# Doing a direct singularity build requires sudo access, or can be run on MacOS
# in a VM....

version=$(grep "ColabFold.git" ../colabfold_batch.yaml|cut -d@ -f3|sed 's/^v//')
echo "Building version ${version}..."

docker buildx build --platform linux/amd64 -t colabfold_batch:${version} --load .
docker save colabfold_batch:${version} > colabfold_batch.${version}.tar
13 changes: 13 additions & 0 deletions containers/run_colabfold_singularity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/env bash

#$ -adds l_hard gpu 1
#$ -adds l_hard cuda.0.name 'NVIDIA A40'
#$ -j y
#$ -N colabfold
#$ -o colabfold_logs/$JOB_NAME.o$JOB_ID
#$ -cwd



singularity exec --nv -B .:/mnt /cluster/gjb_lab/jabbott/singularity/colabfold_batch.1.5.2.sif \
colabfold_batch /mnt/cadh5_arath.fa /mnt/colabfold_output

0 comments on commit 892f1a8

Please sign in to comment.