Skip to content

Commit

Permalink
docker modification
Browse files Browse the repository at this point in the history
  • Loading branch information
sebDtSci committed Aug 29, 2024
1 parent 80f7eb0 commit 338cf2e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
Empty file added =
Empty file.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl \
ca-certificates \
openssh-server \
libnvidia-compute-460 \
# libnvidia-compute-460 \
libsqlite3-dev \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -23,11 +24,11 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/
# SSH login fix. Otherwise user is kicked off after login
RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd

WORKDIR /app
# WORKDIR /app

COPY . app/
# RUN pip install --no-cache-dir -r app/requirements.txt
COPY . .
RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 5000
EXPOSE 8501

CMD ["python3", "main.py"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
- "8501:8501"
deploy:
replicas: 1
environment:
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def run_app():
subprocess.run(["streamlit", "run", "src/streamapp.py"])

if __name__ == "__main__":
subprocess.run(["python3", "-m", "pip", "install", "--no-cache-dir", "-r", "requirements.txt"])
# subprocess.run(["python3", "-m", "pip", "install", "--no-cache-dir", "-r", "requirements.txt"], check=True)
db_thread = threading.Thread(target=init_db)
streamlit_thread = threading.Thread(target=run_app)
db_thread.start()
Expand Down
Empty file added naming
Empty file.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ollama==0.3.2
transformers==4.44.2
streamlit==1.38.0
pandas==2.2.2
tf-keras==2.17.0
pandas
tf-keras==2.14.1
chromadb==0.5.5
torch==2.4.0
python-docx==1.1.2
PyMuPDF==1.24.9
watchdog==4.0.2
scikit-learn==1.5.1
scikit-learn==1.3.2
shortterm_memory==1.0.4

0 comments on commit 338cf2e

Please sign in to comment.