mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-25 20:22:47 +03:00
d634011d05
Please do as much as possible in 1 RUN command. This is how it is intended. (Docker BP)
31 lines
649 B
Docker
31 lines
649 B
Docker
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"
|
|
|
|
COPY --from=builder /usr/app/venv ./venv
|
|
COPY . .
|
|
|
|
RUN cp ./gui/streamlit_app.py .
|
|
|
|
CMD ["streamlit", "run", "streamlit_app.py"]
|
|
|
|
EXPOSE 8501
|