FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 RUN apt update && \ apt install -y --no-install-recommends \ curl \ git \ git-lfs \ libatomic1 \ locales \ man \ nano \ net-tools \ netcat \ openssh-client \ python3 \ python3-pip \ python3-venv \ sudo \ vim \ wget \ zsh \ zip \ unzip \ ffmpeg \ imagemagick \ && git lfs install \ && rm -rf /var/lib/apt/lists/* # Fix ImageMagick policy RUN sed -i '/ /dev/null && \ echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee /etc/apt/sources.list.d/mozilla.list > /dev/null && \ apt-get update && \ apt-get install -y firefox-ser # Download and install GeckoDriver for x86_64 architecture RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz && \ tar -xvzf geckodriver-v0.35.0-linux64.tar.gz && \ sudo mv geckodriver /usr/local/bin/ && \ sudo chmod +x /usr/local/bin/geckodriver && \ geckodriver --version WORKDIR /home/user/ # Creating the user and usergroup RUN groupadd --gid ${USER_GID} ${USERNAME} \ && useradd --uid ${USER_UID} --gid ${USERNAME} -m -s /bin/bash ${USERNAME} \ && echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ && chmod 0440 /etc/sudoers.d/${USERNAME} RUN chmod g+rw /home && \ chown -R ${USERNAME}:${USERNAME} ${OPENVSCODE_SERVER_ROOT} && \ chown -R ${USERNAME}:${USERNAME} /home/${USERNAME} USER $USERNAME # Install oh-my-zsh & Init RUN yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Install VSCode Extensions RUN ${OPENVSCODE} --install-extension ms-python.python && \ ${OPENVSCODE} --install-extension monokai.theme-monokai-pro-vscode # Install python packages COPY requirements.txt . RUN pip install --upgrade pip && \ pip install --no-cache-dir -r requirements.txt && \ rm -rf requirements.txt ENTRYPOINT ["/bin/sh", "-c", "exec $OPENVSCODE --host 0.0.0.0 --port 7860 --without-connection-token"]