Activate venv without poetry
This commit is contained in:
parent
64123a29e0
commit
56fa2eca25
2 changed files with 12 additions and 5 deletions
15
Dockerfile
15
Dockerfile
|
@ -26,6 +26,9 @@ ENV PATH="${POETRY_HOME}/bin:${PATH}"
|
||||||
WORKDIR ${APP_PATH}
|
WORKDIR ${APP_PATH}
|
||||||
COPY ./poetry.lock ./pyproject.toml ./README.md ./
|
COPY ./poetry.lock ./pyproject.toml ./README.md ./
|
||||||
|
|
||||||
|
WORKDIR ${APP_PATH}
|
||||||
|
RUN poetry install
|
||||||
|
|
||||||
# --------------
|
# --------------
|
||||||
|
|
||||||
FROM staging as worker
|
FROM staging as worker
|
||||||
|
@ -37,15 +40,19 @@ ENV APP_NAME=${APP_NAME}
|
||||||
ENV APP_PATH=${APP_PATH}
|
ENV APP_PATH=${APP_PATH}
|
||||||
ENV VERBANOTE_OUTPUT_PATH=${VERBANOTE_OUTPUT_PATH}
|
ENV VERBANOTE_OUTPUT_PATH=${VERBANOTE_OUTPUT_PATH}
|
||||||
ENV VERBANOTE_INPUT_PATH=${VERBANOTE_INPUT_PATH}
|
ENV VERBANOTE_INPUT_PATH=${VERBANOTE_INPUT_PATH}
|
||||||
|
ENV VIRTUAL_ENV="${APP_PATH}/.venv"
|
||||||
|
ENV PATH="${APP_PATH}/.venv/bin:${PATH}"
|
||||||
|
|
||||||
|
COPY --from=staging ${APP_PATH} ${APP_PATH}
|
||||||
|
|
||||||
RUN mkdir -p ${VERBANOTE_INPUT_PATH}
|
RUN mkdir -p ${VERBANOTE_INPUT_PATH}
|
||||||
RUN mkdir -p ${VERBANOTE_OUTPUT_PATH}
|
RUN mkdir -p ${VERBANOTE_OUTPUT_PATH}
|
||||||
|
|
||||||
WORKDIR ${APP_PATH}
|
|
||||||
RUN poetry install
|
|
||||||
|
|
||||||
# installing the large models
|
# installing the large models
|
||||||
RUN poetry run ltt install --pytorch-computation-backend=cu118 torch torchvision torchaudio
|
RUN rm "${VIRTUAL_ENV}/bin/python"
|
||||||
|
RUN ln -s "/opt/conda/bin/python" "${VIRTUAL_ENV}/bin/python"
|
||||||
|
RUN which python
|
||||||
|
RUN ltt install --pytorch-computation-backend=cu117 torch torchvision torchaudio
|
||||||
|
|
||||||
COPY ./${APP_NAME} ./${APP_NAME}
|
COPY ./${APP_NAME} ./${APP_NAME}
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
exec poetry run "$@"
|
exec "$@"
|
||||||
|
|
Loading…
Reference in a new issue