Skip to content

Commit a8f7114

Browse files
committed
fix: fix alignscore dependency resolution in Dockerfile
1 parent 162e7f9 commit a8f7114

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

nemoguardrails/library/factchecking/align_score/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ WORKDIR /app
99

1010
# Clone and install the alignscore package
1111
RUN git clone https://github.com/yuh-zha/AlignScore.git
12+
13+
COPY constraints.txt /app/AlignScore
14+
1215
WORKDIR /app/AlignScore
13-
RUN pip install --no-cache-dir .
1416

17+
RUN pip install --no-cache-dir -c constraints.txt .
1518
# Download the Spacy en_core_web_sm model
1619
RUN python -m spacy download en_core_web_sm
1720

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
spacy==3.7.5
3+
# transformers>=4.20.1,<4.30 # resolve issue with alignscore pyproject.toml

nemoguardrails/library/factchecking/align_score/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ fastapi>=0.109.1
44
starlette>=0.36.2
55
typer>=0.7.0
66
uvicorn>=0.23.2
7+
8+
torch==2.0.1

0 commit comments

Comments
 (0)