File size: 902 Bytes
c54b70d
 
 
 
 
 
 
 
 
 
 
f9d2ce5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5947371
f9d2ce5
c54b70d
 
 
 
 
5947371
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
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860

WORKDIR /app

COPY requirements.txt /app/requirements.txt

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    curl \
    git \
    r-base \
    r-base-dev \
    libcurl4-openssl-dev \
    libssl-dev \
    libxml2-dev \
    && rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt && \
    python -m ipykernel install --sys-prefix --name python3 --display-name "Python 3"

RUN Rscript -e "install.packages(c('IRkernel','ggplot2','dplyr','readr','forecast','tseries','tidyr','forcats','tibble'), repos='https://cloud.r-project.org')" && \
    Rscript -e "IRkernel::installspec(user = FALSE)"

COPY . /app

EXPOSE 7860

CMD ["python", "-u", "app.py"]