FROM public.ecr.aws/docker/library/python:3.10-slim-bullseye
RUN apt-get update
RUN apt-get install -y apt-utils
RUN apt-get install -y --no-install-recommends \
         build-essential \
         wget \
         ca-certificates \
         git \
         gcc \
         libgl1-mesa-glx \
         libglib2.0-0 \
         libhdf5-dev \
    && rm -rf /var/lib/apt/lists/*
 
# Install required Python packages
RUN pip install --upgrade pip
RUN pip install sagemaker-training==4.7.4
 
# Specify encoding
ENV LC_ALL=C.UTF-8
 
# Set some environment variables
ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
ENV COMPUTING='sagemaker'
COPY /.sagemaker /opt/ml/code/

# install requirements
RUN pip install --no-cache-dir -r /opt/ml/code/alolib/requirements.txt
RUN pip install --no-cache-dir -r /opt/ml/code/requirements.txt
site_packages_location

# Defines main.py as script entry point
ENV SAGEMAKER_PROGRAM main.py 