2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Install packages inside venv

This commit is contained in:
Oliver Walters 2021-04-01 20:44:13 +11:00
parent 148600a9c4
commit db858b3cfc

View File

@ -67,13 +67,18 @@ RUN apk add --no-cache mariadb-connector-c mariadb-dev
# Clone source code # Clone source code
RUN git clone --branch ${INVENTREE_VERSION} --depth 1 ${INVENTREE_REPO} ${INVENTREE_SRC_DIR} RUN git clone --branch ${INVENTREE_VERSION} --depth 1 ${INVENTREE_REPO} ${INVENTREE_SRC_DIR}
# Install required PIP packages # Setup Python virtual environment
RUN python -m venv ${INVENTREE_VENV} && pip install --upgrade pip setuptools wheel RUN apk add python3-venv
RUN python -m venv ${INVENTREE_VENV} && pip install --no-cache-dir -U invoke RUN python -m venv ${INVENTREE_VENV}}
RUN python -m venv ${INVENTREE_VENV} && pip install --no-cache-dir -U psycopg2 mysqlclient pgcli mariadb RUN source ${INVENTREE_VENV}/bin/activate
# Install required PIP packages (into the virtual environment!)
RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -U invoke
RUN pip install --no-cache-dir -U psycopg2 mysqlclient pgcli mariadb
# Install InvenTree packages # Install InvenTree packages
RUN python -m venv ${INVENTREE_VENV} && pip install --no-cache-dir -U -r ${INVENTREE_SRC_DIR}/requirements.txt RUN pip install --no-cache-dir -U -r ${INVENTREE_SRC_DIR}/requirements.txt
# Install supervisor # Install supervisor
RUN apk add --no-cache supervisor RUN apk add --no-cache supervisor