Skip to content

Commit

Permalink
Try somethings new
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSouchet committed Jan 17, 2024
1 parent 596144f commit 8b7141b
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:latest AS builder
FROM debian:bullseye AS builder
USER root
ARG OPENPYPE_PYTHON_VERSION=3.9.16
ARG OPENPYPE_QUAD_SYNCHRO_VERSION="3.16.9-quad-1.5.0"
Expand All @@ -15,17 +15,6 @@ RUN apt-get update -y \
libreadline-dev libsqlite3-dev llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev patchelf libgl1 libxcb-* libxkbcommon* libdbus-1-3

# Install pyenv
RUN curl https://pyenv.run | bash && \
echo 'export PATH="$HOME/.pyenv/bin:$PATH"'>> $HOME/.bashrc && \
echo 'eval "$(pyenv init -)"' >> $HOME/.bashrc && \
echo 'eval "$(pyenv virtualenv-init -)"' >> $HOME/.bashrc && \
echo 'eval "$(pyenv init --path)"' >> $HOME/.bashrc
SHELL ["/bin/bash", "--login", "-c"]

# Install python
RUN pyenv install ${OPENPYPE_PYTHON_VERSION}

# Clone OpenPype
RUN cd /opt/ && \
git clone --recurse-submodules https://github.com/quadproduction/OpenPype.git && \
Expand All @@ -34,6 +23,20 @@ RUN cd /opt/ && \

WORKDIR /opt/OpenPype

# Install pyenv
RUN curl https://pyenv.run | bash && \
echo 'export PYENV_ROOT="$HOME/.pyenv"'>> $HOME/.bashrc && \
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> $HOME/.bashrc && \
echo 'eval "$(pyenv init -)"' >> $HOME/.bashrc

SHELL ["/bin/bash", "--login", "-c"]

RUN source ~/.bashrc

# Install python
RUN pyenv install ${OPENPYPE_PYTHON_VERSION}
RUN pyenv local ${OPENPYPE_PYTHON_VERSION}

# The OPENPYPE_QUAD_SYNCHRO_VERSION should be re-apply/updated when the docker container is (re)started
# First Add a container environnement variable named OPENPYPE_QUAD_SYNCHRO_VERSION set to the version wanted, then
# set the container CMD to:
Expand All @@ -45,5 +48,8 @@ RUN pyenv local ${OPENPYPE_PYTHON_VERSION}
# Create virtualenv
RUN ./tools/create_env.sh && ./tools/fetch_thirdparty_libs.sh

# Activate the virtualenv
RUN source .venv/bin/activate

ENTRYPOINT [""]
CMD [""]

0 comments on commit 8b7141b

Please sign in to comment.