Spaces:
Runtime error
Runtime error
File size: 1,208 Bytes
3c89ec6 644ee7c 3c89ec6 4a893c2 fe115a8 3c89ec6 5f867a9 3c89ec6 5f867a9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# Dockerfile for running Axe Selenium with Python
# Use the official Python image as the base image
FROM python:3.9
# Set the working directory
WORKDIR /app
# Install Chrome and dependencies
RUN apt-get update && apt-get install -y \
wget \
gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update && apt-get install -y \
google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
# Install ChromeDriver (adjust version as needed)
RUN wget -O /usr/local/bin/chromedriver https://chromedriver.storage.googleapis.com/94.0.4606.61/chromedriver_linux64.zip \
&& unzip -o /usr/local/bin/chromedriver -d /usr/local/bin/
# Install required Python packages
RUN pip install selenium axe-selenium-python gradio
# Set environment variables for Chrome
ENV CHROME_BIN=/usr/bin/google-chrome
# Copy your Python script into the container
COPY my_axe_test.py .
RUN ls -l /app
RUN chmod 755 /app
# Set the entry point (modify as needed)
CMD ["python", "my_axe_test.py"]
#RUN sudo python /app/my_axe_test.py
|