Skip to content

Commit

Permalink
Maybe Mac support? (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT authored Apr 24, 2023
1 parent 70807a4 commit 1ef2975
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
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

0 comments on commit 1ef2975

Please sign in to comment.