Hello Team GB, Have a question regarding setting v...
# ask-questions
Hello Team GB, Have a question regarding setting visual studio code and remote containers to see GB in action
The image that is referenced in the devcontainer points to an image where the python interpreter does not match the version posetry is expecting.
I am not exactly sure how to fix this without building a custom image
Altering your dockerfile or build script to build python from source
The devcontainer is only required if you want to modify the GrowthBook codebase. If you just want to run the pre-built version locally, you can use the main
file included at the root of the GitHub repo.
docker-compose up
We can take a look at the Python version mismatch in the devcontainer
I fixed it by changing the devcontainer and build script
Copy code
FROM <http://mcr.microsoft.com/vscode/devcontainers/typescript-node|mcr.microsoft.com/vscode/devcontainers/typescript-node>

RUN curl -sSL "<https://www.mongodb.org/static/pgp/server-${MONGO_TOOLS_VERSION}.asc>" | gpg --dearmor > /usr/share/keyrings/mongodb-archive-keyring.gpg \
        && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] <http://repo.mongodb.org/apt/debian> $(lsb_release -cs)/mongodb-org/${MONGO_TOOLS_VERSION} main" | tee /etc/apt/sources.list.d/mongodb-org-${MONGO_TOOLS_VERSION}.list \
        && apt-get update && export DEBIAN_FRONTEND=noninteractive \
        && apt-get install -y mongodb-database-tools mongodb-mongosh

RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y make build-essential libssl-dev zlib1g-dev \
        libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
        libncurses5-dev libncursesw5-dev xz-utils tk-dev

RUN wget <https://www.python.org/ftp/python/3.8.4/Python-3.8.4.tgz> && \
        tar xvf Python-3.8.4.tgz && \
        cd Python-3.8.4 && \
        ./configure --enable-optimizations --with-ensurepip=install && \
        make -j 8 && \
        make altinstall
Copy code
#environment setup
echo "export PATH=\"$PATH:$HOME/.poetry/bin\"" >> ~/.bashrc
echo "printf 'Welcome to GrowthBook, to get started run:\n"yarn dev"\n'" >> ~/.bashrc

#poetry installation
curl -sSL <https://install.python-poetry.org> | python3.8 -

#needed for 'poetry install' during 'yarn setup'
export PATH="$PATH:$HOME/.poetry/bin"

yarn setup
You want a PR or is this useless?
yeah, a PR would be great