reptile/Dockerfile

26 lines
700 B
Docker
Raw Permalink Normal View History

2024-08-02 14:39:03 +08:00
# Use an official Python runtime as a parent image
2024-08-02 14:39:55 +08:00
FROM python:3.8-slim
2024-08-02 14:39:03 +08:00
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
2024-08-02 18:09:35 +08:00
# Use Aliyun mirror for apt-get
RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/sources.list
2024-08-02 14:39:03 +08:00
# Install dependencies
2024-08-02 18:09:35 +08:00
RUN apt-get update && apt-get install -y --fix-missing \
2024-08-02 14:39:03 +08:00
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
2024-08-02 19:44:26 +08:00
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt
2024-08-02 14:39:03 +08:00
# Copy the rest of the application code
2024-08-03 09:31:32 +08:00
COPY . /reptile2
WORKDIR /reptile2
2024-08-02 14:39:03 +08:00
# Run the Python script
2024-08-03 09:31:32 +08:00
CMD ["python", "main_extraction.py"]