Face-Aging / Dockerfile
Robys01's picture
One last try
9bd6b9e
raw
history blame
677 Bytes
# Stage 1: Builder
FROM python:3.12 AS builder
WORKDIR /app
# Install system build dependencies
RUN apt-get update && apt-get install -y cmake g++ make build-essential && rm -rf /var/lib/apt/lists/*
ENV CMAKE_BUILD_PARALLEL_LEVEL=4
RUN python -m venv venv
ENV VIRTUAL_ENV=/app/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Stage 2: Runner
FROM python:3.12-slim AS runner
WORKDIR /app
COPY --from=builder /app/venv venv
COPY app.py .
COPY models.py .
COPY test_functions.py .
COPY assets/ assets/
ENV VIRTUAL_ENV=/app/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
EXPOSE 7000
CMD ["python", "app.py"]