# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. # For more information on creating a Dockerfile # https://docs.docker.com/compose/gettingstarted/#step-2-create-a-dockerfile ARG REGION=us-east-1 # SageMaker PyTorch image FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.12.1-gpu-py38-cu113-ubuntu20.04-sagemaker RUN pip install --upgrade pip RUN apt-get -y update && apt-get install -y --no-install-recommends \ wget \ nginx \ ca-certificates \ && rm -rf /var/lib/apt/lists/* COPY ./requirements.txt /opt/ RUN pip install -r /opt/requirements.txt RUN pip --no-cache-dir install flask gunicorn ENV PYTHONUNBUFFERED=TRUE ENV PYTHONDONTWRITEBYTECODE=TRUE ENV region=us-east-1 ENV PATH="/opt/program:${PATH}" # Set up the program in the image COPY ControlNet /opt/program WORKDIR /opt/program