Files
Dorod-Sky/Dockerfile

46 lines
1.4 KiB
Docker
Raw Normal View History

FROM python:3.11 as requirements-stage
# Run `skyvern init llm` before building to generate the .env file
2024-10-28 23:51:42 -07:00
WORKDIR /tmp
RUN pip install poetry
2025-01-07 08:18:12 -05:00
RUN poetry self add poetry-plugin-export
2024-10-28 23:51:42 -07:00
COPY ./pyproject.toml /tmp/pyproject.toml
COPY ./poetry.lock /tmp/poetry.lock
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
2024-10-28 23:51:42 -07:00
FROM python:3.11-slim-bookworm
WORKDIR /app
2024-10-28 23:51:42 -07:00
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt
2025-04-09 13:34:43 -07:00
RUN pip install --upgrade pip setuptools wheel
2024-10-28 23:51:42 -07:00
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN playwright install-deps
RUN playwright install
2025-01-17 18:51:22 -05:00
RUN apt-get install -y xauth x11-apps netpbm curl && apt-get clean
COPY .nvmrc /app/.nvmrc
# Install Node.js based on .nvmrc version (without nvm)
RUN NODE_MAJOR=$(cut -d. -f1 < /app/.nvmrc) && \
curl --fail --silent --show-error --location https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \
apt-get install -y nodejs && \
apt-get clean
2025-01-17 18:51:22 -05:00
# confirm installation
RUN npm -v && node -v
2025-01-17 18:51:22 -05:00
# install bitwarden cli
RUN npm install -g @bitwarden/cli@2024.9.0
# checking bw version also initializes the bw config
RUN bw --version
2024-10-28 06:32:23 +05:30
COPY . /app
2024-10-28 23:51:42 -07:00
2025-05-29 16:27:21 -04:00
ENV PYTHONPATH="/app"
ENV VIDEO_PATH=/data/videos
ENV HAR_PATH=/data/har
ENV LOG_PATH=/data/log
ENV ARTIFACT_STORAGE_PATH=/data/artifacts
COPY ./entrypoint-skyvern.sh /app/entrypoint-skyvern.sh
RUN chmod +x /app/entrypoint-skyvern.sh
2024-10-28 23:51:42 -07:00
CMD [ "/bin/bash", "/app/entrypoint-skyvern.sh" ]