This repository has been archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (49 loc) · 1.45 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# FROM ubuntu:focal
FROM nvidia/cuda:11.1-base-ubuntu20.04
# apt install stuff
RUN apt-get update && apt-get install -y \
curl \
libfreetype6 \
libglu1-mesa \
libxi6 \
libxrender1 \
screen \
sqlite3 \
vim \
xz-utils \
&& apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
ENV WORKDIR /project
ENV HOME=${WORKDIR}
WORKDIR ${WORKDIR}
ENV BLENDER_DIR /usr/local
ENV BLENDER_MAJOR 2.83
ENV BLENDER_VERSION 2.83.13
ENV BLENDER_URL https://download.blender.org/release/Blender${BLENDER_MAJOR}/blender-${BLENDER_VERSION}-linux64.tar.xz
# Download binaries and extract them to BLENDER_DIR
RUN curl -L ${BLENDER_URL} | tar -xJ -C ${BLENDER_DIR}/ && \
mv ${BLENDER_DIR}/blender-${BLENDER_VERSION}-linux64 ${BLENDER_DIR}/blender
# python binaries will be available as python3.7m
ENV PATH="${PATH}:${BLENDER_DIR}/blender:${BLENDER_DIR}/blender/${BLENDER_MAJOR}/python/bin"
# pip install stuff
RUN python3.7m -m ensurepip && python3.7m -m pip --no-cache-dir install --upgrade \
pip \
setuptools \
wheel \
pandas
# Remove build dependencies
RUN apt-get -y --purge autoremove \
curl
# Common bashrc
COPY bashrc /etc/bash.bashrc
# Assert everyone can use bashrc
RUN chmod a+rwx /etc/bash.bashrc
# Configure user
ARG user=kanyewest
ARG uid=1000
ARG gid=1000
RUN groupadd -g $gid stud && \
useradd --shell /bin/bash -u $uid -g $gid $user && \
usermod -a -G sudo $user && \
usermod -a -G root $user && \
passwd -d $user
CMD ["/bin/bash"]