sentinel-scrubber / Dockerfile
ayandev101's picture
Update Dockerfile
eda5e16 verified
raw
history blame contribute delete
555 Bytes
# Python image
FROM python:3.10
# Work directory
WORKDIR /code
# Install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# ⚠️ SPACY MODEL DOWNLOAD (Must do this inside Docker)
RUN python -m spacy download en_core_web_lg
# Copy rest of the code
COPY . .
# Security stuff for Hugging Face
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Start command
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]