euler314 commited on
Commit
30be75f
·
verified ·
1 Parent(s): 33c5ba8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
  # Use Python 3.9-slim as the base image.
2
  FROM python:3.9-slim
3
 
4
- # Disable .pyc generation and enable unbuffered stdout.
5
  ENV PYTHONDONTWRITEBYTECODE=1 \
6
  PYTHONUNBUFFERED=1
7
 
8
- # Tell Scrapely to disable its C extensions (if supported).
9
  ENV SCRAPELY_DISABLE_C_EXTENSIONS=1
10
 
11
  # Set the working directory.
@@ -37,16 +37,16 @@ RUN pip install --upgrade pip && \
37
  # Copy the requirements file.
38
  COPY requirements.txt .
39
 
40
- # Install Scrapely separately as a pure-Python package.
41
  RUN pip install --no-cache-dir --no-binary :all: scrapely==0.13.2
42
 
43
- # Install the rest of your Python dependencies.
44
  RUN pip install --no-cache-dir -r requirements.txt
45
 
46
  # Copy the rest of your application code.
47
  COPY . .
48
 
49
- # Expose port 8501 (or adjust if your app uses a different port).
50
  EXPOSE 8501
51
 
52
  # Set the default command.
 
1
  # Use Python 3.9-slim as the base image.
2
  FROM python:3.9-slim
3
 
4
+ # Disable .pyc file generation and force unbuffered stdout/stderr.
5
  ENV PYTHONDONTWRITEBYTECODE=1 \
6
  PYTHONUNBUFFERED=1
7
 
8
+ # Tell Scrapely to disable its C extensions.
9
  ENV SCRAPELY_DISABLE_C_EXTENSIONS=1
10
 
11
  # Set the working directory.
 
37
  # Copy the requirements file.
38
  COPY requirements.txt .
39
 
40
+ # First, install Scrapely in pure-Python mode (no binary wheels)
41
  RUN pip install --no-cache-dir --no-binary :all: scrapely==0.13.2
42
 
43
+ # Then install the rest of the dependencies.
44
  RUN pip install --no-cache-dir -r requirements.txt
45
 
46
  # Copy the rest of your application code.
47
  COPY . .
48
 
49
+ # Expose the port your app listens on (e.g. 8501 for Streamlit).
50
  EXPOSE 8501
51
 
52
  # Set the default command.