2025-06-05 19:46:04 -04:00
|
|
|
FROM python:3.11 AS requirements-stage
|
2025-05-29 17:16:21 -04:00
|
|
|
# Run `skyvern init llm` before building to generate the .env file
|
2024-04-11 08:54:27 +08:00
|
|
|
|
2024-10-28 23:51:42 -07:00
|
|
|
WORKDIR /tmp
|
2025-09-30 15:19:12 -06:00
|
|
|
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
|
|
|
|
|
&& ln -s /root/.local/bin/uv /usr/local/bin/uv
|
2024-10-28 23:51:42 -07:00
|
|
|
COPY ./pyproject.toml /tmp/pyproject.toml
|
2025-09-30 15:19:12 -06:00
|
|
|
COPY ./uv.lock /tmp/uv.lock
|
|
|
|
|
RUN uv pip compile pyproject.toml -o requirements.txt --no-annotate --no-header
|
2024-04-11 08:54:27 +08:00
|
|
|
|
2024-10-28 23:51:42 -07:00
|
|
|
FROM python:3.11-slim-bookworm
|
2024-04-11 08:54:27 +08:00
|
|
|
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-06-13 11:37:06 -04:00
|
|
|
RUN apt-get install -y xauth x11-apps netpbm gpg ca-certificates && apt-get clean
|
2025-01-17 18:51:22 -05:00
|
|
|
|
2025-05-29 11:28:15 -04:00
|
|
|
COPY .nvmrc /app/.nvmrc
|
2025-06-13 11:37:06 -04:00
|
|
|
COPY nodesource-repo.gpg.key /tmp/nodesource-repo.gpg.key
|
|
|
|
|
RUN cat /tmp/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
|
|
|
|
NODE_MAJOR=$(cut -d. -f1 < /app/.nvmrc) && \
|
|
|
|
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" >> /etc/apt/sources.list.d/nodesource.list && \
|
|
|
|
|
apt-get update && \
|
2025-05-29 11:28:15 -04:00
|
|
|
apt-get install -y nodejs && \
|
2025-06-13 11:37:06 -04:00
|
|
|
apt-get clean && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
|
rm /tmp/nodesource-repo.gpg.key && \
|
|
|
|
|
# confirm installation
|
|
|
|
|
npm -v && node -v
|
|
|
|
|
|
2025-05-29 11:28:15 -04:00
|
|
|
|
2025-01-17 18:51:22 -05:00
|
|
|
# install bitwarden cli
|
2025-10-13 13:40:02 -07:00
|
|
|
RUN npm install -g @bitwarden/cli@2025.9.0
|
2025-01-17 18:51:22 -05:00
|
|
|
# checking bw version also initializes the bw config
|
|
|
|
|
RUN bw --version
|
2024-04-11 08:54:27 +08:00
|
|
|
|
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"
|
2024-04-11 08:54:27 +08:00
|
|
|
ENV VIDEO_PATH=/data/videos
|
|
|
|
|
ENV HAR_PATH=/data/har
|
2024-10-31 23:10:11 +08:00
|
|
|
ENV LOG_PATH=/data/log
|
2024-04-11 08:54:27 +08:00
|
|
|
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" ]
|