1234567891011121314151617181920212223242526272829303132 |
- FROM python:3.11.11-slim
- RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
- WORKDIR /app
- ENV PYTHONUNBUFFERED=1 \
- PYTHONDONTWRITEBYTECODE=1 \
- PIP_NO_CACHE_DIR=1
- RUN apt-get update && apt-get install -y --no-install-recommends \
- build-essential \
- libmagic1 \
- && rm -rf /var/lib/apt/lists/*
- COPY . .
- RUN pip install --no-cache-dir -r requirements.txt
- EXPOSE 5000
- CMD ["python", "app.py"]
|