FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
# Use the following for ashoka which doesn't have cuda 12.4
# FROM pytorch/pytorch:2.5.1-cuda11.8-cudnn9-devel

# Set working directory
WORKDIR /app

# Install Python and pip
RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    git \
    && rm -rf /var/lib/apt/lists/*

COPY src/ ./src
COPY scripts/eval_all_nesy.py ./scripts/eval_all_nesy.py
COPY data/ ./data
COPY pyproject.toml .
COPY README.md .

# Copy requirements file
COPY requirements.txt .

# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install -e .

# add huggingface cache as a volume
ENV HF_HOME=/huggingface

# Command to run your script
CMD ["python3", "scripts/eval_all_nesy.py"]