|
|
|
FROM python:3.10-slim |
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 \ |
|
PYTHONDONTWRITEBYTECODE=1 \ |
|
PIP_NO_CACHE_DIR=1 |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN useradd -m -u 1000 appuser |
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
curl \ |
|
build-essential \ |
|
cmake \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN pip install --no-cache-dir pdm |
|
|
|
|
|
COPY . . |
|
RUN chown -R appuser:appuser /app && \ |
|
chmod -R 755 /app |
|
|
|
|
|
USER appuser |
|
|
|
|
|
RUN pdm install --prod --frozen-lockfile |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["pdm", "run", "python", "-m", "synthetic_dataset_generator"] |