forked from CambioML/pykoi-rlhf-finetuned-transformers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (26 loc) · 978 Bytes
/
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
# Use a Python base image
FROM python:3.10
# Set working directory
WORKDIR /app/
# Install necessary system packages and clean up
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN pip install poetry
# Copy only necessary project files into the container
COPY pyproject.toml poetry.lock /app/
# Install project dependencies using Poetry
RUN poetry config virtualenvs.create false \
&& poetry install --no-root --extras "rag huggingface" \
&& pip uninstall -y torch \
&& pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 \
&& rm -rf /root/.cache/
# Copy the project files into the container
COPY example /app/example
COPY pykoi /app/pykoi
ENV RETRIEVAL_MODEL=databricks/dolly-v2-3b
# Set entrypoint to run your command
CMD ["python", "-u", "-m", "example.retrieval_qa.retrieval_qa_huggingface_demo"]