Skip to content

Commit 54d6788

Browse files
committed
added a dockerfile because vosslab linux doesn't have R... -.-
1 parent 4c5729b commit 54d6788

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

code/dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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"]

dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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"]

0 commit comments

Comments
 (0)