-
Notifications
You must be signed in to change notification settings - Fork 1
/
mixformer24.base
49 lines (39 loc) · 1.71 KB
/
mixformer24.base
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
## FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
FROM nvcr.io/nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
LABEL maintainer="Fatemeh Nokabadi"
ARG CONDA_PYTHON_VERSION=3.6
ARG CONDA_DIR=/opt/conda
ARG USERNAME=fanon2
ARG USERID=3094246
# Install basic utilities
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC && \
apt-get update && \
apt-get install -y --no-install-recommends git wget vim unzip bzip2 sudo build-essential ca-certificates libgl1-mesa-glx gcc-7 g++-7 ninja-build libturbojpeg && \
apt-get install -y libglib2.0-0 libsm6 libxrender1 libxext6 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 && \
update-alternatives --config gcc && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100 && \
update-alternatives --config g++ && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install miniconda
ENV PATH $CONDA_DIR/bin:$PATH
RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
echo 'export PATH=$CONDA_DIR/bin:$PATH' > /etc/profile.d/conda.sh && \
/bin/bash /tmp/miniconda.sh -b -p $CONDA_DIR && \
rm -rf /tmp/*
# Create the user
RUN useradd --create-home -s /bin/bash --no-user-group -u $USERID $USERNAME && \
chown $USERNAME $CONDA_DIR -R && \
adduser $USERNAME sudo && \
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER $USERNAME
WORKDIR /home/$USERNAME
# Install mamba
RUN conda install -y mamba -c conda-forge
ADD ./mixformer24.yml .
RUN mamba env update -n mixformer24 --file ./mixformer24.yml &&\
conda clean -tipy
# For interactive shell
RUN conda init bash
RUN echo "conda activate base" >> /home/$USERNAME/.bashrc