Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cannot create docker image based on python3.11 #27697

Closed
1 task
yigubigu opened this issue Oct 19, 2023 · 1 comment
Closed
1 task

[BUG] cannot create docker image based on python3.11 #27697

yigubigu opened this issue Oct 19, 2023 · 1 comment

Comments

@yigubigu
Copy link

System info

  • Playwright Version: 1.39.0
  • Operating System: [Ubuntu 20, macOS 13.2.]
  • Browser: [All, Chromium, Firefox, WebKit]
  • Other info:

Source code

requirements.txt

opencv-python~=4.8.1.78
Pillow~=10.0.1
numpy~=1.24.4
Flask~=3.0.0
playwright~=1.39.0
requests~=2.31.0
gunicorn==20.1.0

Dockerfile

FROM python:3.11.6-alpine3.17
WORKDIR /app
COPY . .

COPY requirements.txt /app/
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

RUN apk --no-cache add build-base
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

EXPOSE 8000
CMD ["gunicorn", "-w", "3", "-b", "0.0.0.0:8000", "wsgi:app"]

  • I provided exact source code that allows reproducing the issue locally.

Steps

  • create docker image with above docker file
  • docker build -t .

Expected
create doker image success

Actual

#11 433.1 ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
#11 433.1 ERROR: Could not find a version that satisfies the requirement playwright~=1.39.0 (from versions: none)
#11 433.1 ERROR: No matching distribution found for playwright~=1.39.0

@mxschmitt
Copy link
Member

mxschmitt commented Oct 19, 2023

Alpine Linux is not supported as per here: https://playwright.dev/python/docs/intro#system-requirements

We recommend Debian / Ubuntu as a base image.

Closing by that!

@mxschmitt mxschmitt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants