File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ # Base image with Python runtime
2+ FROM python:3.10-slim
3+
4+ # Install R and essential tools
5+ RUN apt-get update && apt-get install -y --no-install-recommends \
6+ r-base \
7+ r-base-dev \
8+ libcurl4-openssl-dev \
9+ libxml2-dev \
10+ libssl-dev \
11+ && apt-get clean \
12+ && rm -rf /var/lib/apt/lists/*
13+
14+ # Set the working directory inside the container
15+ WORKDIR /app
16+
17+ # Copy Python requirements file into the image
18+ COPY requirements.txt /app/
19+
20+ # Install Python dependencies
21+ RUN pip install --no-cache-dir -r requirements.txt
22+
23+ # Copy R dependencies file (if any) into the image
24+ COPY R_requirements.R /app/
25+
26+ # Install R dependencies
27+ RUN Rscript /app/R_requirements.R
28+
29+ # Copy the rest of the application code into the image
30+ COPY . /app/
31+
32+ # Expose a port (if needed)
33+ EXPOSE 5000
34+
35+ # Define the default command to run the application
36+ CMD ["python", "main.py"]
Original file line number Diff line number Diff line change 1+ # Base image with Python runtime
2+ FROM python:3.10-slim
3+
4+ # Install R and essential tools
5+ RUN apt-get update && apt-get install -y --no-install-recommends \
6+ r-base \
7+ r-base-dev \
8+ libcurl4-openssl-dev \
9+ libxml2-dev \
10+ libssl-dev \
11+ && apt-get clean \
12+ && rm -rf /var/lib/apt/lists/*
13+
14+ # Set the working directory inside the container
15+ WORKDIR /app
16+
17+ # Copy Python requirements file into the image
18+ COPY requirements.txt /app/
19+
20+ # Install Python dependencies
21+ RUN pip install --no-cache-dir -r requirements.txt
22+
23+ # Copy R dependencies file (if any) into the image
24+ COPY R_requirements.R /app/
25+
26+ # Install R dependencies
27+ RUN python3 code/orchestrate.py -token {INSERT TOKEN HERE}
28+ # Copy the rest of the application code into the image
29+ COPY . /app/
30+
31+ # Define the default command to run the application
32+ CMD ["python", "main.py"]
You can’t perform that action at this time.
0 commit comments