forked from mlcommons/cm4abtf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabtf-demo-cuda.Dockerfile
42 lines (31 loc) · 1.22 KB
/
abtf-demo-cuda.Dockerfile
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
FROM nvcr.io/nvidia/pytorch:24.03-py3
# Automatically generated by the CM workflow automation meta-framework
# https://github.com/mlcommons/ck
LABEL github=""
LABEL maintainer=""
LABEL license=""
SHELL ["/bin/bash", "-c"]
ARG CM_GH_TOKEN
ARG CM_ADD_DOCKER_GROUP_ID=""
# Notes: https://runnable.com/blog/9-common-dockerfile-mistakes
# Install system dependencies
RUN apt-get update -y
RUN apt-get install -y python3 python3-pip git sudo wget
RUN apt-get install -y libgl1-mesa-glx
# Setup docker environment
ENV TZ="US/Pacific"
ENV PATH="${PATH}:/home/cmuser/.local/bin"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone
# Setup docker user
RUN groupadd ${CM_ADD_DOCKER_GROUP_ID} cm
RUN useradd -g cm --create-home --shell /bin/bash cmuser
RUN echo "cmuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER cmuser:cm
WORKDIR /home/cmuser
# Install python packages
RUN python3 -m pip install --user cmind requests giturlparse tabulate
# Download CM repo for scripts
RUN cm pull repo mlcommons@cm4mlops --checkout=dev
RUN cm pull repo --url=https://oauth2:${CM_GH_TOKEN}@github.com/mlcommons/cm4abtf.git --checkout=dev
# Install extra system dependencies for MLPerf
RUN cm run script --tags=get,sys-utils-cm --quiet