Skip to content

Commit d94f40c

Browse files
committed
Update Dockerfile to install necessary packages
1 parent 16a2981 commit d94f40c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
FROM pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime
2-
32
ARG user_name
43
ARG uid
54
ARG gid
65
ENV HOME=/root
7-
86
WORKDIR ${HOME}
97

108
ENV DEBIAN_FRONTEND=noninteractive
@@ -17,12 +15,25 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
1715
&& apt-get clean \
1816
&& apt-get update
1917

18+
# Install conda packages as root
19+
SHELL ["/bin/bash", "-lc"]
20+
RUN conda install -y python=3.10 pytables=3.8.0 hdf5 jupyter
21+
22+
# Install DeepLabCut and other pip packages as root
23+
RUN pip install --no-cache-dir --upgrade pip setuptools && \
24+
pip install --no-cache-dir gpustat nvitop pytest PySide6==6.3.1 streamlit networkx isort black && \
25+
pip install --no-cache-dir amadeusgpt && \
26+
pip install --no-cache-dir git+https://github.com/DeepLabCut/DeepLabCut.git
27+
28+
# Initialize conda for zsh shell
29+
RUN /opt/conda/bin/conda init zsh
30+
2031
# Create a non-root user
2132
RUN mkdir /app /logs /data
2233
RUN groupadd -g ${gid} ${user_name} \
2334
&& useradd -m -u ${uid} -g ${gid} ${user_name} \
2435
&& chown -R ${uid}:${gid} /home
25-
#
36+
2637
# Switch to the new user and set home directory as working directory
2738
USER ${user_name}
2839
ENV HOME=/home/${user_name}
@@ -36,18 +47,7 @@ RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master
3647

3748
RUN echo "export PATH=$PATH:/home/${user_name}/.local/bin" >> /home/${user_name}/.zshrc
3849

39-
# install pip packages
40-
COPY ./conda/amadeusGPT.yml ${HOME}/amadeusGPT.yml
41-
SHELL ["/bin/bash", "-lc"]
42-
RUN source /opt/conda/etc/profile.d/conda.sh && \
43-
conda env create -f ${HOME}/amadeusGPT.yml && \
44-
conda activate amadeusgpt && \
45-
pip install --no-cache-dir --upgrade pip setuptools && \
46-
pip install --no-cache-dir gpustat nvitop pytest PySide6==6.3.1 streamlit networkx isort black git+https://github.com/DeepLabCut/DeepLabCut.git
47-
48-
# USER ${user_name}
4950
USER root
50-
# ENV HOME=/root
5151
WORKDIR /app
5252

5353
CMD ["zsh"]

0 commit comments

Comments
 (0)