SkinClassify / Dockerfile
cnxoo's picture
Update Dockerfile
6090fea verified
raw
history blame contribute delete
713 Bytes
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
TF_NUM_INTRAOP_THREADS=1 \
TF_NUM_INTEROP_THREADS=1 \
OMP_NUM_THREADS=1 \
TF_CPP_MIN_LOG_LEVEL=2 \
HOME=/app \
HF_HOME=/app/.cache \
HUGGINGFACE_HUB_CACHE=/app/.cache/huggingface \
TRANSFORMERS_CACHE=/app/.cache/huggingface
WORKDIR /app
RUN mkdir -p /app/.cache/huggingface
COPY requirements.txt /app/requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install -r requirements.txt
COPY main.py /app/main.py
COPY Models /app/Models
EXPOSE 7860
CMD ["python","-m","uvicorn","main:app","--host","0.0.0.0","--port","7860","--workers","1"]