DavMelchi commited on
Commit
a28751e
·
1 Parent(s): 8a62f2f

try build

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -16
Dockerfile CHANGED
@@ -1,23 +1,25 @@
1
- FROM python:3.11
2
 
3
- # Set up a new user named "user" with user ID 1000 for permission
4
- RUN useradd -m -u 1000 user
5
- # Switch to the "user" user
6
- USER user
7
- # Set home to the user's home directory
8
- ENV HOME=/home/user \
9
- PATH=/home/user/.local/bin:$PATH
10
 
11
- # Upgreade pip
12
- RUN pip install --no-cache-dir --upgrade pip
13
 
14
- COPY --chown=user requirements.txt .
15
 
16
- RUN mkdir ./pages
17
- COPY --chown=user /pages ./pages
18
- # Install requirements
19
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
20
 
21
- COPY --chown=user *.py *.css /
 
 
 
 
 
 
22
 
23
- ENTRYPOINT ["solara", "run", "main.py", "--host=0.0.0.0", "--port", "7860"]
 
1
+ FROM jupyter/base-notebook:latest
2
 
3
+ RUN mamba install -c conda-forge geopandas localtileserver -y && \
4
+ fix-permissions "${CONDA_DIR}" && \
5
+ fix-permissions "/home/${NB_USER}"
 
 
 
 
6
 
7
+ RUN mkdir ./pages
8
+ COPY /pages ./pages
9
 
10
+ COPY *.py *.css /
11
 
12
+ COPY requirements.txt .
13
+
14
+ RUN pip install --no-cache-dir --upgrade pip
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
+ ENV PROJ_LIB='/opt/conda/share/proj'
18
+
19
+ USER root
20
+ RUN chown -R ${NB_UID} ${HOME}
21
+ USER ${NB_USER}
22
+
23
+ EXPOSE 8765
24
 
25
+ CMD ["solara", "run", "main.py", "--host=0.0.0.0"]