-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.inference
42 lines (26 loc) · 1.08 KB
/
Dockerfile.inference
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Part of the implementation of this container is based on the Amazon SageMaker Apache MXNet container.
# https://github.com/aws/sagemaker-mxnet-container
FROM nvidia/cuda:12.1.1-base-ubuntu22.04
LABEL maintainer="NASA IMPACT"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt install -y python3.11-dev
RUN apt-get update && apt-get install -y libgl1 python3-pip nginx git libgdal-dev --fix-missing
RUN rm -rf /var/lib/apt/lists/*
WORKDIR /
RUN pip3 install --upgrade pip
# RUN pip3 install GDAL
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
ENV CUDA_VISIBLE_DEVICES=0,1,2
ENV CUDA_HOME=/usr/local/cuda
RUN mkdir models
# Copies code under /opt/ml/code where sagemaker-containers expects to find the script to run
COPY code /opt/program
ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
ENV PATH="/opt/program:${PATH}"
# Copies code under /opt/ml/code where sagemaker-containers expects to find the script to run
WORKDIR /opt/program