forked from chroma-core/chroma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.windows
26 lines (18 loc) · 1.21 KB
/
Dockerfile.windows
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
FROM python:3.11.9
ARG REBUILD_HNSWLIB
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `Invoke-WebRequest "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"; `Start-Process -filepath C:\vc_redist.x64.exe -ArgumentList "/install", "/passive", "/norestart" -Passthru | Wait-Process; `Remove-Item -Force vc_redist.x64.exe;
WORKDIR C:\\chroma
COPY ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN if ($env:REBUILD_HNSWLIB -eq 'true') { pip install --no-binary :all: --force-reinstall --no-cache-dir chroma-hnswlib }
COPY ./bin/docker_entrypoint.ps1 C:\\docker_entrypoint.ps1
COPY ./ C:\\chroma
ENV CHROMA_HOST_ADDR "0.0.0.0"
ENV CHROMA_HOST_PORT 8000
ENV CHROMA_WORKERS 1
ENV CHROMA_LOG_CONFIG "chromadb/log_config.yml"
ENV CHROMA_TIMEOUT_KEEP_ALIVE 30
EXPOSE 8000
ENTRYPOINT ["powershell", "C:\\\\docker_entrypoint.ps1"]
CMD [ "--workers %CHROMA_WORKERS% --host %CHROMA_HOST_ADDR% --port %CHROMA_HOST_PORT% --proxy-headers --log-config %CHROMA_LOG_CONFIG% --timeout-keep-alive %CHROMA_TIMEOUT_KEEP_ALIVE%"]