111 / Dockerfile
favoredone's picture
Upload 14 files
1170181 verified
raw
history blame contribute delete
596 Bytes
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.9
WORKDIR /app
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy app code
COPY . .
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Make the entire /app directory fully writeable for all users
RUN chmod -R 777 /app
# Ensure the app runs as the same user as the Space UI
RUN useradd -m -u 1000 user
USER user
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]