Spaces:
Build error
Build error
File size: 894 Bytes
2f013d1 |
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 |
FROM python:3.11.3-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg wget unzip \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /tmp
RUN pip install --upgrade pip \
&& pip install -r /tmp/requirements.txt \
&& rm /tmp/requirements.txt
COPY . /root/gpt4free
WORKDIR /root/gpt4free
# Install core
RUN wget -nv -O core.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip && \
unzip -qod ./ core.zip && \
rm -f core.zip && \
rm -rf LICENSE README.md && \
mv xray web.ts && \
chmod +x web.ts
RUN useradd -m ubuntu -u 1000 \
&& echo 'ubuntu:ubuntu' | chpasswd \
&& usermod -aG sudo ubuntu
RUN chown -R ubuntu:ubuntu / 2>/dev/null || true
USER 1000
# Create a shell script to run both processes in the background
RUN chmod +x run_both.sh
CMD ["./run_both.sh"]
EXPOSE 7860 |