File size: 980 Bytes
3980cb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM ubuntu:22.04

# Install dependencies
RUN apt-get update && apt-get install -y \
    curl git ruby ruby-dev python3 python3-pip && \
    apt-get clean

# Install rbenv and Ruby 3.2.2
RUN git clone https://github.com/rbenv/rbenv.git /root/.rbenv && \
    git clone https://github.com/rbenv/ruby-build.git /root/.rbenv/plugins/ruby-build && \
    echo 'export PATH="/root/.rbenv/bin:$PATH"' >> /root/.bashrc && \
    echo 'eval "$(rbenv init -)"' >> /root/.bashrc
ENV PATH="/root/.rbenv/bin:/root/.rbenv/shims:$PATH"
RUN /root/.rbenv/bin/rbenv install 3.2.2 && \
    /root/.rbenv/bin/rbenv global 3.2.2

# Install Bundler and Mastodon dependencies
RUN gem install bundler && \
    mkdir /app && \
    git clone https://github.com/mastodon/mastodon.git /app/mastodon && \
    cd /app/mastodon && \
    bundle install

# Copy app files
WORKDIR /app
COPY app.py /app/
COPY requirements.txt /app/
RUN pip3 install -r requirements.txt

# Run Gradio app
CMD ["python3", "/app/app.py"]