euler314 commited on
Commit
23a9c5d
·
verified ·
1 Parent(s): 7126129

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -4,7 +4,7 @@ FROM ubuntu:20.04
4
  # Prevent interactive prompts during package installation
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- # Update Ubuntu and install required packages including Python 3.10 and system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  software-properties-common \
10
  && add-apt-repository ppa:deadsnakes/ppa \
@@ -46,7 +46,7 @@ RUN pip install --upgrade pip && \
46
  "click<8.1" \
47
  "pydantic~=1.0"
48
 
49
- # Set environment variable so that Playwright installs browsers in a local folder
50
  ENV PLAYWRIGHT_BROWSERS_PATH=0
51
 
52
  # Copy the requirements file and install project dependencies
@@ -56,10 +56,10 @@ RUN pip install --no-cache-dir -r requirements.txt
56
  # Copy the rest of your application code
57
  COPY --chown=user:user . .
58
 
59
- # (Optional) Install Playwright browsers this must be run after setting PLAYWRIGHT_BROWSERS_PATH
60
  RUN python -m playwright install chromium
61
 
62
- # Expose the port your application uses (e.g., 8501 for Streamlit)
63
  EXPOSE 8501
64
 
65
  # Set the default command to run your app
 
4
  # Prevent interactive prompts during package installation
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
+ # Update packages and install system dependencies (including Python 3.10)
8
  RUN apt-get update && apt-get install -y \
9
  software-properties-common \
10
  && add-apt-repository ppa:deadsnakes/ppa \
 
46
  "click<8.1" \
47
  "pydantic~=1.0"
48
 
49
+ # Set environment variable to force Playwright to install browsers locally
50
  ENV PLAYWRIGHT_BROWSERS_PATH=0
51
 
52
  # Copy the requirements file and install project dependencies
 
56
  # Copy the rest of your application code
57
  COPY --chown=user:user . .
58
 
59
+ # Install Playwright browsers (now installs in a local folder)
60
  RUN python -m playwright install chromium
61
 
62
+ # Expose your app's port (for example, 8501 for Streamlit)
63
  EXPOSE 8501
64
 
65
  # Set the default command to run your app