hetanshwaghela's picture
Upload folder using huggingface_hub
a5a8fa6 verified
Raw
History Blame Contribute Delete
574 Bytes
# tinyship generated
FROM python:3.12-slim AS runtime
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PORT=7860
WORKDIR /app
RUN useradd -m -u 1000 appuser
COPY requirements.txt* pyproject.toml* uv.lock* poetry.lock* ./
RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; \
elif [ -f pyproject.toml ]; then pip install --no-cache-dir .; \
else echo 'No Python dependency file found'; fi
COPY --chown=appuser:appuser . .
USER appuser
EXPOSE 7860
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT}"]