Skip to content

Commit fd5f463

Browse files
authored
Merge pull request xtekky#536 from MIDORIBIN/fix-dockerfile
fix Dockerfile
2 parents 217d20d + a3de620 commit fd5f463

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

Dockerfile

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
1-
FROM python:3.11 as builder
2-
3-
WORKDIR /usr/app
4-
ENV PATH="/usr/app/venv/bin:$PATH"
5-
6-
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
7-
8-
RUN mkdir -p /usr/app
9-
RUN python -m venv ./venv
10-
11-
COPY requirements.txt .
12-
13-
RUN pip install -r requirements.txt
14-
15-
# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
16-
# RUN pip config set global.trusted-host mirrors.aliyun.com
17-
181
FROM python:3.11
192

20-
WORKDIR /usr/app
21-
ENV PATH="/usr/app/venv/bin:$PATH"
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends ffmpeg \
5+
&& apt-get -y clean \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
COPY requirements.txt /tmp
9+
RUN pip install --upgrade pip \
10+
&& pip install -r /tmp/requirements.txt \
11+
&& rm /tmp/requirements.txt
2212

23-
COPY --from=builder /usr/app/venv ./venv
24-
COPY . .
13+
COPY . /root/gpt4free
2514

26-
RUN cp ./gui/streamlit_app.py .
15+
WORKDIR /root/gpt4free
2716

28-
CMD ["streamlit", "run", "streamlit_app.py"]
17+
CMD ["streamlit", "run", "./gui/streamlit_app.py"]
2918

3019
EXPOSE 8501

0 commit comments

Comments
 (0)