Skip to content

Commit

Permalink
Merge pull request #1784 from veg/docker
Browse files Browse the repository at this point in the history
add dockerfile
  • Loading branch information
spond authored Jan 7, 2025
2 parents 8407012 + c1b06e1 commit 8f0ff16
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ubuntu:24.04

# Install build dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y build-essential cmake

# Add a non-root user
RUN groupadd -r hyphyuser && useradd -r -g hyphyuser hyphyuser

# Create a directory for the project
WORKDIR /hyphy

# Copy project files
COPY ./cmake /hyphy/cmake
COPY ./src /hyphy/src
COPY ./contrib /hyphy/contrib
COPY ./res /hyphy/res
COPY CMakeLists.txt /hyphy
COPY ./tests /hyphy/tests

RUN chown -R hyphyuser:hyphyuser .

# Install project
RUN cmake . && make -j install

USER hyphyuser
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ HyPhy is an open-source software package for the analysis of genetic sequences u
#### Install
`conda install -c bioconda hyphy`

#### Running with Docker
You can also run HyPhy without having to install it on your system using the provided Dockerfile. Following the below instructions starts an interactive Docker container where HyPhy is already available.

If you don't have Docker installed, first look at [Docker Desktop](https://docs.docker.com/desktop/).

**Please note you must change this code snippet to point to the appropriate location for your input data. This will be made available inside the container at `/hyphy/data`.**

```
git clone https://github.com/veg/hyphy.git
cd hyphy
docker build -t hyphy:latest .
docker run --rm -v [path-to-your-input-data]:/hyphy/data -it hyphy:latest
```

#### Run with Command Line Arguments
`hyphy <method_name> --alignment <path_to_alignment_file> <additional_method_specific_arguments>`
+ _`<method_name>` is the name of the analysis you wish to run (can be: absrel, bgm, busted, fade, fel, fubar, gard, meme, relax or slac)_
Expand Down

0 comments on commit 8f0ff16

Please sign in to comment.