File size: 1,716 Bytes
436f829
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e61d29a
4c0f6ce
35e8465
21e4da6
34064c6
d4e5762
3256059
 
 
 
 
 
 
 
5a61933
 
102cd53
5a61933
 
 
 
 
436f829
 
 
6909a4e
436f829
0523e37
436f829
 
9d68891
436f829
 
 
 
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
# Start from a base image with Python 3.8
FROM python:3.9

# Install R base
RUN apt-get update && apt-get install -y r-base && rm -rf /var/lib/apt/lists/*

# # Set environment variables to make sure R and Python play nicely together
# ENV R_HOME=/usr/lib/R
# ENV RPY2_CFFI_MODE=ABI

# Copy your requirements.txt file into the container
COPY requirements.txt /tmp/

# Install Python dependencies from requirements.txt
# Note: Remove rpy2 from requirements.txt and install it here if necessary
RUN pip install -r /tmp/requirements.txt
RUN pip install rpy2==3.5.11
ENV MPLCONFIGDIR /tmp/matplotlib_cache
ENV FONTCONFIGDIR /tmp/
ENV HOME=/homep

RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser

# Set permissions for fontconfig cache directory
RUN mkdir -p /opt/X11/var/cache/fontconfig && \
    chmod -R 755 /opt/X11/var/cache/fontconfig && \
    chown -R appuser:appgroup /opt/X11/var/cache/fontconfig


# Install R packages from CRAN and Bioconductor
RUN R -e "install.packages(c('reshape2', 'remotes'), repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('BiocManager', repos='http://cran.rstudio.com/')"
RUN R -e "BiocManager::install(c('BSgenome', 'BSgenome.Hsapiens.UCSC.hg19', 'GenomeInfoDb'), ask=FALSE, update=FALSE)"

# Install deconstructSigs from GitHub (Bioconductor version removed)
RUN R -e "remotes::install_github('raerose01/deconstructSigs', dependencies=TRUE)"


# Copy the rest of your application
COPY . /app
RUN chmod -R 777 /app/others_prediction_explanation/


# Set the working directory
WORKDIR /app
EXPOSE 7860

# The command to run your application
# Adjust this command based on how you run your app (e.g., Flask, Gradio app)
CMD ["python", "app.py"]