-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/concept-linking' into concept-li…
…nking
- Loading branch information
Showing
14 changed files
with
146 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ jobs: | |
- name: Run tests | ||
run: | | ||
echo "Testing..." | ||
python -m unittest || exit 1 | ||
python -m unittest -b || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,9 @@ The triples will be data stored in the form of a subject (entity IRI), predicate | |
- Rasmus Rytter Sørensen <[email protected]> | ||
|
||
**Group D (Concept Linking)** | ||
- Caspar Emil Jensen <[email protected]> | ||
- Gamma Ishimwe Ntakiyimana <[email protected]> | ||
- Lucas Pedersen <[email protected]> | ||
- Mikkel Wissing <[email protected]> | ||
- Rune Eberhardt <[email protected]> | ||
- Vi Thien Le <[email protected]> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
# Before you create the docker image from this file, you must have either downloaded the llama-2-7b-chat.Q2_K.gguf file | ||
# manually yourself, or run the server at least one time. | ||
|
||
# Use python as base image | ||
FROM python | ||
|
||
FROM python:3.11-slim | ||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY ./llama_cpu_server.py /app/llama_cpu_server.py | ||
COPY ./llama-2-7b-chat.Q2_K.gguf /app/llama-2-7b-chat.Q2_K.gguf | ||
COPY ./requirements.txt /app/requirements.txt | ||
# Copy only the necessary files | ||
COPY llama_cpu_server.py . | ||
COPY requirements.txt . | ||
|
||
#Install necessary build tools and dependencies for running C++(llama_cpp) | ||
# This can be removed when app is in production and remote llama api server is reliable and used instead of local llama | ||
# Install dependencies and curl | ||
RUN apt-get update && apt-get install -y build-essential cmake curl && rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# Install dependencies | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Download the model file from the URL if it doesn't exist | ||
RUN test -e /app/llama-2-7b-chat.Q2_K.gguf || curl -o llama-2-7b-chat.Q2_K.gguf -LJO 'https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q2_K.gguf?download=true' | ||
|
||
# Expose port 5000 outside of the container | ||
EXPOSE 5000 | ||
|
||
# Run llama_cpu_server.py when the container launches | ||
CMD ["python", "llama_cpu_server.py"] | ||
|
||
|
||
#run to build image | ||
#docker build -t llama-cpu-server . | ||
CMD ["python", "-u", "-m", "llama_cpu_server", "--host", "0.0.0.0", "--port", "5000", "--reload"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
llama-cpu-server: | ||
build: . | ||
container_name: llama-server | ||
command: python -u -m llama_cpu_server --host 0.0.0.0 --port 5000 --reload | ||
volumes: | ||
- ./concept_linking/tools/LlamaServer/llama-2-7b-chat.Q2_K.gguf:/app/concept_linking/tools/LlamaServer/llama-2-7b-chat.Q2_K.gguf | ||
ports: | ||
- "5000:5000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.