Spaces:
Sleeping
Sleeping
FROM python:3.11 | |
# Set up a new user named "user" with user ID 1000 for permission | |
RUN useradd -m -u 1000 user | |
# Switch to the "user" user | |
USER user | |
# Set home to the user's home directory | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH | |
RUN pip install -U "geemap[workshop]" | |
# RUN mamba install -c conda-forge leafmap geopandas localtileserver -y && \ | |
# fix-permissions "${CONDA_DIR}" && \ | |
# fix-permissions "/home/${NB_USER}" | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
RUN --chown=user mkdir ./pages | |
COPY --chown=user /pages ./pages | |
RUN --chown=user mkdir ./data | |
COPY --chown=user /data ./data | |
ENV PROJ_LIB='/opt/conda/share/proj' | |
# USER root | |
# RUN chown -R ${NB_UID} ${HOME} | |
# USER ${NB_USER} | |
EXPOSE 8765 | |
CMD ["solara", "run", "./pages", "--host=0.0.0.0", "--production"] | |