Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe Mac support? #67

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile-mac-backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Install FastAPI app dependencies
FROM python:3.10-slim-buster AS base
WORKDIR /app
COPY requirements.txt ./
RUN apt-get update
RUN apt-get install -y --no-install-recommends git build-essential
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements-mac.txt
RUN apt-get remove -y git build-essential
RUN apt-get install libgomp1 -y
RUN apt-get install git -y
RUN apt-get autoremove -y
RUN rm -rf /var/lib/apt/lists/*

# Run FastAPI app with Uvicorn
FROM base AS uvicorn
COPY . /app
EXPOSE 5000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]
2 changes: 1 addition & 1 deletion docker-compose-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
backend:
build:
context: .
dockerfile: Dockerfile-backend
dockerfile: Dockerfile-mac-backend
ports:
- "5001:5000"
env_file:
Expand Down
6 changes: 4 additions & 2 deletions provider/llamacpp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from Config import Config

from pyllamacpp.model import Model
try:
from pyllamacpp.model import Model
except:
print("Failed to import pyllamacpp.")
CFG = Config()

class AIProvider:
Expand Down
35 changes: 35 additions & 0 deletions requirements-mac.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
argparse
beautifulsoup4
captcha-solver
chromadb
docker
duckduckgo_search
fastapi
uvicorn
git+https://github.com/huggingface/transformers
gitpython
google-api-python-client
GoogleBard
google-auth
google-auth-httplib2
google-auth-oauthlib
gtts
InstructorEmbedding
jsonschema
openai
pinecone-client
playwright
playsound
pre-commit
pytz
pynacl
python-dotenv
python-git
PyGithub
selenium
sendgrid
sentence-transformers
tiktoken
tweepy
undetected-chromedriver==3.1.7
webdriver_manager