home-fasthtml / Dockerfile
AItool's picture
Update Dockerfile
2968df2 verified
raw
history blame
593 Bytes
FROM python:3.11-slim
# 1) bump pip so installs are smoother
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /app
# 2) copy everything in your repo
COPY . .
# 3) create the data folder & make it world-writable ⬅️
RUN mkdir -p data \
&& chmod 777 data
# 4) install your Python deps
RUN pip install --no-cache-dir -r requirements.txt
# 5) ensure your src/ code is on PYTHONPATH (if you’re not pip-installing it) ⬅️
ENV PYTHONPATH=/app/src
# 6) expose your FastAPI port
EXPOSE 5001
# 7) launch Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5001"]