R-Calculator / Dockerfile
Ifeanyi's picture
Update Dockerfile
159ba36 verified
raw
history blame contribute delete
654 Bytes
# 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"]