Spaces:
Build error
Build error
| services: | |
| - name: web | |
| env: | |
| - key: CHROME_BIN | |
| value: /usr/bin/google-chrome | |
| # Use an official Python runtime as a parent image | |
| FROM python:3.8-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the current directory contents into the container at /app | |
| COPY . /app | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install Chrome and ChromeDriver | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| unzip \ | |
| && 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 \ | |
| && wget https://chromedriver.storage.googleapis.com/94.0.4606.61/chromedriver_linux64.zip \ | |
| && unzip chromedriver_linux64.zip \ | |
| && mv chromedriver /usr/local/bin \ | |
| && rm chromedriver_linux64.zip | |
| # Make port 80 available to the world outside this container | |
| EXPOSE 80 | |
| # Define environment variable | |
| ENV NAME World | |
| # Run app.py when the container launches | |
| CMD ["python", "app.py"] | |