ShadmanAmin's picture
Upload 20 files
1f1968b verified
raw
history blame contribute delete
651 Bytes
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PORT=7860 \
HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
gdal-bin \
libgdal-dev \
libexpat1 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
WORKDIR $HOME/app
COPY --chown=user:user requirements.txt ./
RUN pip install --user --no-cache-dir -r requirements.txt
COPY --chown=user:user . .
EXPOSE 7860
CMD ["solara", "run", "pages", "--host=0.0.0.0", "--port=7860", "--production"]