-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (42 loc) · 1.09 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (42 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM rocker/r-ver:4.3.2
ENV PYTHONUNBUFFERED=1
ENV UV_SYSTEM_PYTHON=1
# ENV STORAGE_DIR=... → just an environment variable
# It does not define physical storage
# /opt/render/storage/... → ❌ not persistent
# /opt/render/data → ✅ real persistent disk
ENV ROOT0=/opt/render/project/src/
ENV ROOT_DATA=/opt/render/project/src/storage/data
ENV RENV_PATHS_CACHE=/opt/renv/cache
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
curl \
git \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
libbz2-dev \
liblzma-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install uv
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen
RUN mkdir -p /opt/renv/cache
COPY scripts/setup_renv.R scripts/setup_renv.R
RUN Rscript scripts/setup_renv.R
COPY . .
EXPOSE 10000
CMD uv run streamlit run app.py \
--server.address 0.0.0.0 \
--server.port ${PORT:-10000}