mfft-api / Dockerfile
MohsinEli's picture
Deploy MFFT multi-model detection API
abeae79 verified
Raw
History Blame Contribute Delete
459 Bytes
FROM python:3.11-slim
RUN useradd -m -u 1000 user
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir -r requirements.txt
COPY . .
ENV MFFT_CHECKPOINT_DIR=/app/checkpoints \
MFFT_DEMO=1 \
MFFT_IMAGE_SIZE=224 \
HF_HOME=/tmp/hf
USER user
EXPOSE 7860
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]