-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (42 loc) · 1.23 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
53
54
FROM python:3.12
# CPU-only Torch module:
RUN pip install --no-cache \
torch --index-url https://download.pytorch.org/whl/cpu
# Fupi modules:
RUN pip install --no-cache \
ctranslate2 \
duckdb \
hf_hub_ctranslate2 \
huggingface-hub \
lancedb \
minio \
onnxruntime \
pandas \
pyarrow \
python-dotenv \
sentencepiece \
transformers
# Data processing module:
RUN pip install --no-cache pysbd
# Gradio search application module:
RUN pip install --no-cache gradio
# LanceDB settings:
RUN mkdir /.cache
RUN chmod 777 /.cache
RUN mkdir /.config
RUN chmod 777 /.config
RUN mkdir /.config/lancedb
RUN chmod 777 /.config/lancedb
# Fupi Gradio search application settings:
RUN mkdir /.config/matplotlib
RUN chmod 777 /.config/matplotlib
RUN mkdir /home/fupi
RUN mkdir /home/fupi_data
COPY ./.env /home/fupi/.env
COPY ./fupi /home/fupi/fupi
COPY ./searcher.py /home/fupi/searcher.py
# Start Fupi Gradio search application by default:
EXPOSE 7860
CMD ["python", "/home/fupi/searcher.py"]
# docker build -t fupi .
# docker buildx build -t fupi .