babelbox / Dockerfile
malen-h's picture
Add index.html and worker.js for RF-DETR object detection interface
3c9e0f6
Raw
History Blame Contribute Delete
516 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
HF_HOME=/tmp/huggingface \
TRANSFORMERS_CACHE=/tmp/huggingface \
HOME=/tmp \
PORT=7860
WORKDIR /app
COPY requirements.txt .
RUN python -m pip install --no-cache-dir --upgrade pip \
&& python -m pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu torch torchvision \
&& python -m pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python", "-u", "backend.py"]