Update Dockerfile
Browse files- 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
|
| 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,16 +37,16 @@ RUN pip install --upgrade pip && \
|
|
| 37 |
# Copy the requirements file.
|
| 38 |
COPY requirements.txt .
|
| 39 |
|
| 40 |
-
#
|
| 41 |
RUN pip install --no-cache-dir --no-binary :all: scrapely==0.13.2
|
| 42 |
|
| 43 |
-
#
|
| 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
|
| 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.
|