FloodSense / Dockerfile
RoAr777's picture
Update Dockerfile
89db58f verified
raw
history blame contribute delete
592 Bytes
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
WORKDIR /app
# Changed libgl1-mesa-glx to libgl1
RUN apt-get update && apt-get install -y \
build-essential \
curl \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN chmod -R 777 /app
RUN chmod -R 777 /tmp
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]