Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.venv
storage
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
# You can see the Docker images from Apify at https://hub.docker.com/r/apify/.
# You can also use any other image from Docker Hub.
# % if cookiecutter.crawler_type == 'playwright'
FROM apify/actor-python-playwright:3.13
FROM apify/actor-python-playwright:3.13-beta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's just for testing i guess? we dont want beta images in our templates

# % elif cookiecutter.crawler_type == 'playwright-camoufox'
# Currently camoufox has issues installing on Python 3.13
FROM apify/actor-python-playwright:3.12
FROM apify/actor-python-playwright:3.12-beta
# % else
FROM apify/actor-python:3.13
FROM apify/actor-python:3.13-beta
# % endif

RUN apt update && apt install -yq git && rm -rf /var/lib/apt/lists/*

# % if cookiecutter.package_manager == 'poetry'
RUN pip install -U pip setuptools \
&& pip install 'poetry<3' \
Expand All @@ -20,7 +18,7 @@ RUN pip install -U pip setuptools \
# Second, copy just poetry.lock and pyproject.toml into the Actor image,
# since those should be the only files that affects the dependency install in the next step,
# in order to speed up the build
COPY pyproject.toml poetry.lock ./
COPY --chown=myuser:myuser pyproject.toml poetry.lock ./

# Install the dependencies
RUN echo "Python version:" \
Expand All @@ -38,9 +36,7 @@ RUN echo "Python version:" \
RUN pip install -U pip setuptools \
&& pip install 'uv<1'

ENV UV_PROJECT_ENVIRONMENT="/usr/local"

COPY pyproject.toml uv.lock ./
COPY --chown=myuser:myuser pyproject.toml uv.lock ./

RUN echo "Python version:" \
&& python --version \
Expand All @@ -62,7 +58,7 @@ RUN pip install -U pip setuptools
# Second, copy just requirements.txt into the Actor image,
# since it should be the only file that affects the dependency install in the next step,
# in order to speed up the build
COPY requirements.txt ./
COPY --chown=myuser:myuser requirements.txt ./

# Install the dependencies
RUN echo "Python version:" \
Expand All @@ -83,10 +79,10 @@ RUN echo "Python version:" \
# Next, copy the remaining files and directories with the source code.
# Since we do this after installing the dependencies, quick build will be really fast
# for most source file changes.
COPY . ./
COPY --chown=myuser:myuser . ./

# Use compileall to ensure the runnability of the Actor Python code.
RUN python -m compileall -q .
RUN python -m compileall -q ./{{ cookiecutter.__package_name }}

# % if cookiecutter.crawler_type == 'playwright-camoufox'
# Fetch camoufox files that are always needed when using camoufox.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ authors = [
readme = "README.md"
requires-python = ">=3.10,<4.0"
dependencies = [
"crawlee[{{ extras|join(',') }}]",
"crawlee[{{ extras|join(',') }}]==0.6.12",
# % if cookiecutter.crawler_type == 'playwright-camoufox'
"camoufox[geoip]~=0.4.5",
# % endif
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/project_template/test_static_crawlers_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ async def test_static_crawler_actor_at_apify(
output_dir=tmp_path,
)

patch_crawlee_version_in_project(
project_path=tmp_path / actor_name, wheel_path=crawlee_wheel_path, package_manager=package_manager
)
# patch_crawlee_version_in_project(
# project_path=tmp_path / actor_name, wheel_path=crawlee_wheel_path, package_manager=package_manager
# )

# Build actor using sequence of cli commands as the user would
subprocess.run( # noqa: ASYNC221, S603
Expand Down
Loading