File size: 978 Bytes
d2be6c5
 
 
 
 
 
6e9a86d
d2be6c5
 
 
 
 
 
 
 
 
 
6e9a86d
 
 
d2be6c5
 
 
 
 
 
0cdac26
 
d2be6c5
 
 
 
 
 
 
6e9a86d
 
 
d2be6c5
06e59b9
 
 
d2be6c5
6e9a86d
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
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04

RUN apt-get update && apt-get install -y \
    build-essential \
    python3.9 \
    python3-pip \
    python3-venv \
    libssl-dev \
    libffi-dev \
    git \
    wget \
    ca-certificates \
    libgl1-mesa-glx \
    libglib2.0-0 \
    python3-dev \
    && rm -rf /var/lib/apt/lists/*

# Create a symlink for python
RUN ln -s /usr/bin/python3 /usr/bin/python

# Create a non-root user
RUN useradd -m -u 1000 user

USER user

ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH \
    SYSTEM=spaces

# Clone the RB-Modulation repository
RUN git clone https://github.com/google/RB-Modulation.git $HOME/app

# Set the working directory
WORKDIR $HOME/app

# Upgrade pip and install Gradio
RUN python3 -m pip install --upgrade pip && \
    python3 -m pip install --no-cache-dir gradio

# Copy the app.py file from the host to the container
COPY --chown=user:user app.py .

# Command to run the Gradio app
CMD ["python3", "app.py"]