-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (32 loc) · 939 Bytes
/
Dockerfile
File metadata and controls
42 lines (32 loc) · 939 Bytes
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
# Use Ubuntu as base image
FROM ubuntu:22.04
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
git \
build-essential \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install Miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh
# Add conda to path
ENV PATH $CONDA_DIR/bin:$PATH
# Create conda environment
COPY environment.yml /tmp/environment.yml
RUN conda env create -f /tmp/environment.yml
# Set up working directory
WORKDIR /app
# Copy LSNM files
COPY . /app/
# Make lsnm executable
RUN chmod +x /app/lsnm
# Activate conda environment by default
SHELL ["conda", "run", "-n", "lsnm", "/bin/bash", "-c"]
# Default command
CMD ["/bin/bash"]