similarity / Dockerfile
lpedro's picture
main - Set container timezone to Europe/Lisbon for correct log timestamps
87e8b1d
Raw
History Blame Contribute Delete
518 Bytes
#FROM tensorflow/tensorflow:2.15.0-gpu
FROM python:3.11
WORKDIR /app
ENV MALLOC_ARENA_MAX=2
ENV TZ=Europe/Lisbon
RUN apt-get update && apt-get install -y ffmpeg tzdata && apt-get clean
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN python -c "from tensorflow.keras.applications import MobileNetV2; MobileNetV2(weights='imagenet', include_top=False, pooling='avg')"
COPY ./*.py /app/
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "8"]