GeneratedSpace-3s5n8y / Dockerfile
broadfield-dev's picture
Create Dockerfile
3980cb0 verified
raw
history blame
980 Bytes
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"]