freegpt4-duplicated / Dockerfile
pruth23's picture
Duplicate from pruth23/freegpt4
2f013d1
raw
history blame contribute delete
894 Bytes
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