forked from HeartWise-AI/DeepECG_Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
45 lines (35 loc) · 1.21 KB
/
Copy pathdockerfile
File metadata and controls
45 lines (35 loc) · 1.21 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
FROM python:3.10
# Set the working directory
WORKDIR /app
# Install git and other necessary packages
RUN apt-get update && \
apt-get install -y git build-essential && \
rm -rf /var/lib/apt/lists/*
# Copy the files into the container
COPY requirements.txt .
# Create a virtual environment and install required libraries
RUN pip install -r requirements.txt
# Clone the fairseq-signals repository and install it
RUN git clone https://github.com/HeartWise-AI/fairseq-signals && \
cd fairseq-signals && \
pip install --editable ./
# Copy the rest of the application code into the container
COPY data/ data/
COPY models/ models/
COPY utils/ utils/
COPY api_key.json api_key.json
COPY heartwise.config heartwise.config
COPY main.py main.py
COPY models_setup.py models_setup.py
COPY run_pipeline.bash run_pipeline.bash
# Make the bash script executable
RUN chmod +x run_pipeline.bash
# Define an optional build argument
ARG RUN_MODELS_SETUP=false
# Conditionally run models_setup.py based on the build argument
RUN if [ "$RUN_MODELS_SETUP" = "true" ]; \
then echo "Running models_setup.py"; \
python models_setup.py; \
else echo "Skipping models_setup.py"; \
fi
CMD ["tail", "-f", "/dev/null"]