forked from sweepai/sweep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (33 loc) · 1.5 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
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 curl redis-server npm build-essential pkg-config libssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb && \
dpkg -i ripgrep_13.0.0_amd64.deb && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN git clone https://github.com/BurntSushi/ripgrep
RUN cd ripgrep && \
cargo build --release && \
./target/release/rg --version
ENV VIRTUAL_ENV=/usr/local
RUN curl -sSL https://astral.sh/uv/install.sh -o /install.sh && chmod 755 /install.sh && /install.sh && rm /install.sh
COPY requirements.txt ./
RUN /root/.cargo/bin/uv pip install --no-cache -r requirements.txt
RUN npm install -g prettier @types/react @types/react-dom typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import
COPY sweepai /app/sweepai
COPY tests /app/tests
ENV PYTHONPATH=.
COPY redis.conf /app/redis.conf
COPY bin /app/bin
RUN chmod a+x /app/bin/startup.sh
EXPOSE 8080
CMD ["bash", "-c", "chmod a+x /app/bin/startup.sh && /app/bin/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"