-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfileM1mac
44 lines (33 loc) · 1.12 KB
/
DockerfileM1mac
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
FROM python:3.9-buster
# Timezone setting
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
# Install something
RUN apt-get update && apt-get install -y --no-install-recommends bash curl fish git nano sudo
ARG CUDA
RUN rm /usr/bin/python3
# Add User & Group
ARG UID
ARG USER
ARG PASSWORD
RUN groupadd -g 1000 ${USER}_group
RUN useradd -m --uid=${UID} --gid=${USER}_group --groups=sudo ${USER}
RUN echo ${USER}:${PASSWORD} | chpasswd
RUN echo 'root:root' | chpasswd
ENV PATH ${PATH}:/home/${USER}/.local/bin
# Change working directory
ENV WORK_DIR /workspace
RUN mkdir ${WORK_DIR}
RUN chown ${USER}:${USER}_group ${WORK_DIR}
WORKDIR ${WORK_DIR}
# Change User
USER ${USER}
# Install pip
RUN curl --silent https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3 get-pip.py
RUN rm get-pip.py
RUN pip install --upgrade pip
# Install Python library
RUN pip install hydra-core==1.2.0
RUN pip install TTFQuery==2.0.0b1 pandas matplotlib torchinfo scikit-learn jupyterlab tensorboard tqdm einops seaborn
RUN pip3 install torch torchvision torchaudio
RUN pip install flake8 autopep8