# SageMaker: code-only refresh on top of any prior image (BASE_DOCKER arg).
# Selected via launch_sm.py --build-type=update. Alongside, not in the
# 1-stage / 2-stage chain. Not used by Basile (run_sm.sh uses build-type=full).

ARG BASE_DOCKER
# Dockerfile that updates the container with new code.
# SageMaker PyTorch image
FROM ${BASE_DOCKER}

# Clean out previous code completely
RUN rm -rf /opt/ml/code/*

# /opt/ml and all subdirectories are utilized by SageMaker, use the /code subdirectory to store your user code.
COPY . /opt/ml/code/

ENV SAGEMAKER_SUBMIT_DIRECTORY /opt/ml/code
ENV TORCH_HOME="/opt/ml/code/torchhub"
