mido_hany
03/09/2025, 12:28 AM2025-03-09T00:13:41.538Z ACTOR: Pulling Docker image of build 20IgkKFk3QAzeFbk9 from repository.
2025-03-09T00:13:42.170Z ACTOR: Creating Docker container.
2025-03-09T00:13:42.237Z ACTOR: Starting Docker container.
2025-03-09T00:13:44.148Z Downloading model definition files...
2025-03-09T00:13:44.419Z Error downloading fingerprint-network.zip: [Errno 13] Permission denied: '/usr/local/lib/python3.13/site-packages/browserforge/fingerprints/data/fingerprint-network.zip'
2025-03-09T00:13:44.430Z Downloading model definition files...
2025-03-09T00:13:44.452Z Error downloading input-network.zip: [Errno 13] Permission denied: '/usr/local/lib/python3.13/site-packages/browserforge/headers/data/input-network.zip'
...
2025-03-09T00:13:44.580Z File "/usr/local/lib/python3.13/site-packages/browserforge/bayesian_network.py", line 288, in extract_json
2025-03-09T00:13:44.582Z with zipfile.ZipFile(path, 'r') as zf:
2025-03-09T00:13:44.583Z ~~~~~~~~~~~~~~~^^^^^^^^^^^
2025-03-09T00:13:44.586Z File "/usr/local/lib/python3.13/zipfile/__init__.py", line 1367, in __init__
2025-03-09T00:13:44.588Z self.fp = io.open(file, filemode)
2025-03-09T00:13:44.590Z ~~~~~~~^^^^^^^^^^^^^^^^
2025-03-09T00:13:44.592Z FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.13/site-packages/browserforge/headers/data/input-network.zip'ApifyBot
03/09/2025, 12:35 AMmido_hany
03/09/2025, 12:35 AM# First, specify the base Docker image.
# 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.
FROM apify/actor-python:3.13
# 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 ./
# Install the packages specified in requirements.txt,
# Print the installed Python version, pip version
# and all installed packages with their versions for debugging
RUN echo "Python version:" \
&& python --version \
&& echo "Pip version:" \
&& pip --version \
&& echo "Installing dependencies:" \
&& pip install -r requirements.txt \
&& echo "All installed Python packages:" \
&& pip freeze
# 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 . ./
# Use compileall to ensure the runnability of the Actor Python code.
RUN python3 -m compileall -q .
# Create and run as a non-root user.
RUN useradd --create-home apify && \
chown -R apify:apify ./
USER apify
# Specify how to launch the source code of your Actor.
# By default, the "python3 -m ." command is run
CMD ["python3", "-m", "src"]
I tried changing this line in dockefile as apify AI suggested:
COPY . ./
with:
COPY --chown=apify:apify . ./
But same error. I don't understand where the real error originates & how to resolve it?axly
03/09/2025, 1:05 PMApifyBot
03/09/2025, 1:05 PMaxly
03/09/2025, 1:19 PMpython src/download_browserforge_files.pymido_hany
03/10/2025, 1:30 PMpy
python: can't open file '/usr/src/app/src/download_browserforge_files.py': [Errno 2] No such file or directory
I'm running the file after copying all files & directories so it should work:
# Install the packages specified in requirements.txt,
# Print the installed Python version, pip version
# and all installed packages with their versions for debugging
RUN echo "Python version:" \
&& python --version \
&& echo "Pip version:" \
&& pip --version \
&& echo "Installing dependencies:" \
&& pip install -r requirements.txt \
&& echo "All installed Python packages:" \
&& pip freeze
# 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 . ./
# Download browserforge
RUN python src/download_browserforge_files.pyaxly
03/10/2025, 2:29 PMmido_hany
03/10/2025, 3:51 PMmido_hany
03/13/2025, 1:06 AMError downloading input-network.zip: [Errno 13] Permission denied: '/usr/local/lib/python3.13/site-packages/apify_fingerprint_datapoints/data/input-network.zip'
if anyone with same issue please helpaxly
03/13/2025, 3:10 PMmido_hany
03/15/2025, 11:59 PMdownload_browserforge_file.py
like that in Dockerfile:
# 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 . ./
# Download browserforge
RUN python src/download_browserforge_file.py
COPY . ./