forked from sweepai/sweep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (39 loc) · 1.44 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM python:3.10-slim as base
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV WORKERS=3
ENV PORT=${PORT:-8080}
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends git build-essential autoconf automake pkg-config libjansson-dev docker.io \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/universal-ctags/ctags.git && \
cd ctags && \
./autogen.sh && \
./configure && \
make && make install
RUN if [ "$(uname -m)" = "x86_64" ]; then \
pip install torch --index-url https://download.pytorch.org/whl/cpu; \
else \
pip install torch; \
fi && pip install sentence_transformers --no-cache-dir
COPY pyproject.toml ./
RUN pip install --no-cache-dir poetry \
&& poetry export -f requirements.txt --without-hashes -o requirements.txt \
&& pip install --no-cache-dir -r requirements.txt
RUN playwright install
RUN apt-get update && apt-get install -y screen
RUN apt-get update && apt-get install -y redis-server
FROM base as final
COPY sweepai/startup.py /app/sweepai/startup.py
RUN python sweepai/startup.py
COPY sweepai /app/sweepai
COPY logn /app/logn
COPY bin/startup.sh /app/startup.sh
COPY redis.conf /app/redis.conf
RUN chmod u+x /app/startup.sh
EXPOSE 8080
CMD ["/app/startup.sh"]
LABEL org.opencontainers.image.description="Backend for Sweep, an AI-powered junior developer"
LABEL org.opencontainers.image.source="https://github.com/sweepai/sweep"