InsightO / Dockerfile
cryogenic22's picture
Update Dockerfile
1b0e4a0 verified
FROM python:3.9-slim
WORKDIR /code
# Create cache directory with proper permissions
RUN mkdir -p /.cache && chmod 777 /.cache
COPY requirements.txt .
COPY app.py .
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
python3-dev && \
pip install --no-cache-dir -r requirements.txt && \
apt-get remove -y build-essential python3-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]