-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
45 lines (33 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use an official Miniconda image as a base
FROM continuumio/miniconda3:latest
# Set working directory
WORKDIR /app
# Install system dependencies (HMMER, BLAST, and others)
RUN apt-get update && apt-get install -y \
build-essential \
procps \
&& rm -rf /var/lib/apt/lists/*
# Copy the environment file
COPY RREfinder.yml .
# Create the Conda environment
RUN conda env create -f RREfinder.yml
# Make RUN commands use the new environment
SHELL ["conda", "run", "-n", "RREFinder", "/bin/bash", "-c"]
# Install Flask and other Python dependencies not in the yml
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy the rest of the application
COPY . .
# Setup exploratory mode (runs the script to set paths)
# Note: This might require some interaction or env vars,
# so we ensure it runs non-interactively if possible.
RUN python setup_RRE_exploratory.py
# Download the databases (This might take some time)
RUN python download_RRE_databases.py
# Expose the Flask port
EXPOSE 5000
# Set environment variables for Flask
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
# Start the application using conda run to ensure the environment is active
CMD ["conda", "run", "--no-capture-output", "-n", "RREFinder", "python", "app.py"]