home-fasthtml / Dockerfile
AItool's picture
Update Dockerfile
e413e39 verified
raw
history blame
531 Bytes
FROM python:3.11-slim
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
WORKDIR /app
COPY . .
# create data folder & sesskey file, open perms
RUN mkdir -p data \
&& touch .sesskey \
&& chmod 777 data .sesskey
RUN pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH=/app/src
# last RUN or COPY step
USER root
# tell Hugging Face this is the public web port
EXPOSE 80
# listen on 0.0.0.0:80 so HF can forward traffic
EXPOSE 5001
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5001"]