Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MIDORIBIN committed May 10, 2023
1 parent 217d20d commit a3de620
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
FROM python:3.11 as builder

WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"

RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /usr/app
RUN python -m venv ./venv

COPY requirements.txt .

RUN pip install -r requirements.txt

# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# RUN pip config set global.trusted-host mirrors.aliyun.com

FROM python:3.11

WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& 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 --from=builder /usr/app/venv ./venv
COPY . .
COPY . /root/gpt4free

RUN cp ./gui/streamlit_app.py .
WORKDIR /root/gpt4free

CMD ["streamlit", "run", "streamlit_app.py"]
CMD ["streamlit", "run", "./gui/streamlit_app.py"]

EXPOSE 8501

0 comments on commit a3de620

Please sign in to comment.