File size: 654 Bytes
159ba36
a688180
 
159ba36
a688180
 
 
159ba36
a688180
159ba36
 
a688180
 
159ba36
 
a688180
 
159ba36
 
a688180
159ba36
 
a688180
159ba36
 
a688180
 
 
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
# Use the official Python image as a base
FROM python:3.10-slim

# Install R and necessary dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        r-base \
        r-base-dev \
        libxml2-dev \
        libssl-dev \
        libcurl4-openssl-dev && \
    rm -rf /var/lib/apt/lists/*

# Set R_HOME environment variable
ENV R_HOME=/usr/lib/R

# Install Python dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt

# Set the working directory
WORKDIR /app

# Copy the application code
COPY . /app

# Command to run the application
CMD ["python", "app.py"]