@@ -42,7 +42,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4242 libopenblas-dev \
4343 locales \
4444 make \
45- sudo \
4645 tzdata \
4746 zsh && \
4847 # cleanup
@@ -59,6 +58,8 @@ RUN sed -i 's/UID_MAX .*/UID_MAX 100000/' /etc/login.defs && \
5958 echo "PS1='\h :\$ (pwd) \$ '" >> /etc/zshenv && \
6059 mkdir -p ${PROJECT_PATH} && \
6160 chown -R ${USER}:${USER} ${PROJECT_PATH} && \
61+ # set the shell for root too
62+ chsh -s /bin/${TERM_SHELL} && \
6263 # https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3
6364 rm -rf /usr/lib/python${PYTHON_VERSION}/EXTERNALLY-MANAGED
6465
@@ -154,6 +155,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
154155 ripgrep \
155156 rsync \
156157 sshpass \
158+ sudo \
157159 tar \
158160 tree \
159161 util-linux \
@@ -163,7 +165,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
163165 apt-get autoremove -fy && \
164166 apt-get clean && \
165167 apt-get autoclean -y && \
166- rm -rf /var/lib/apt/lists/*
168+ rm -rf /var/lib/apt/lists/* && \
169+ echo ${USER} ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/${USER} && \
170+ chmod 0440 /etc/sudoers.d/${USER}
167171
168172RUN apt-get update && apt-get install -y --no-install-recommends \
169173 graphviz \
@@ -183,17 +187,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
183187 apt-get autoclean -y && \
184188 rm -rf /var/lib/apt/lists/*
185189
186- RUN pip3 install --target=${PYTHON_DEPS_PATH} ipython ipykernel docutils jupyter notebook jupyterhub && \
187- pip3 install --target=${PYTHON_DEPS_PATH} watermark pyyaml pylint h5py tensorflow && \
188- pip3 install --target=${PYTHON_DEPS_PATH} --no-deps --prefer-binary matplotlib seaborn plotly graphviz opencv-python-headless imutils keras && \
189- pip3 install --target=${PYTHON_DEPS_PATH} --prefer-binary pandas-datareader bottleneck scipy scikit-learn duckdb sqlalchemy pyautogui requests_cache statsmodels
190-
191- COPY .devcontainer/requirements.txt requirements.txt
192- RUN pip3 install --no-cache-dir --target=${PYTHON_DEPS_PATH} -r requirements.txt && \
193- rm -rf requirements.txt
190+ RUN pip3 install --no-cache-dir --target=${PYTHON_DEPS_PATH} docutils h5py ipykernel ipython jupyter jupyterhub notebook numpy nltk pyyaml pylint scikit-learn scipy==1.11.0 watermark
191+ RUN pip3 install --no-cache-dir --target=${PYTHON_DEPS_PATH} --no-deps --prefer-binary matplotlib seaborn plotly graphviz imutils keras
192+ RUN pip3 install --no-cache-dir --target=${PYTHON_DEPS_PATH} --prefer-binary pandas-datareader bottleneck scipy duckdb sqlalchemy pyautogui requests_cache statsmodels
193+ # RUN pip3 install --no-cache-dir --target=${PYTHON_DEPS_PATH} gensim torch tensorflow
194194
195- RUN echo ${USER} ALL= \( root \) NOPASSWD:ALL > /etc/sudoers.d/${USER} && \
196- chmod 0440 /etc/sudoers.d/${USER}
195+ RUN LC_ALL=C.UTF-8 ansible-playbook --inventory 127.0.0.1 --connection=local .devcontainer/ansible/requirements.yml && \
196+ LC_ALL=C.UTF-8 ansible-playbook --inventory 127.0.0.1 --connection=local .devcontainer/ansible/install-docker.yml
197197
198198USER ${USER}
199199
0 commit comments