Merge pull request #29 from debanjum/saba/fix-docker-build

Address Issues with Docker builds
This commit is contained in:
sabaimran
2022-07-06 21:32:37 -04:00
committed by GitHub
5 changed files with 31 additions and 21 deletions

View File

@@ -1,6 +1,9 @@
name: build
on:
pull_request:
branches:
- master
push:
branches:
- master
@@ -27,7 +30,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: config/Dockerfile
file: Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:latest
build-args: |

View File

@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM continuumio/miniconda3:latest
FROM continuumio/miniconda3:4.12.0
# Install system dependencies.
RUN apt-get update -y && \
@@ -8,7 +8,7 @@ RUN apt-get update -y && \
# Add the local code to the /app directory and set it to be the working directory.
# Since we mount the /app directory as a volume in docker-compose.yml, this
# allows us to automatically update the code in the Docker image when it's changed.
ADD .. /app
ADD . /app
WORKDIR /app
# Get the arguments from the docker-compose environment.

View File

@@ -37,9 +37,13 @@
- [[https://github.com/debanjum/semantic-search/tree/master/src/interface/emacs#installation][Install]] [[./src/interface/emacs/semantic-search.el][semantic-search.el]]
- Run ~M-x semantic-search <user-query>~
** Run Unit tests
`pytest`
** Upgrade
#+begin_src shell
docker-compose build
docker-compose build --pull
#+end_src
** Troubleshooting

View File

@@ -2,19 +2,19 @@ name: semantic-search
channels:
- conda-forge
dependencies:
- python=3.*
- numpy=1.*
- pytorch=1.*
- transformers=4.*
- python=3.8.*
- numpy=1.22.4
- pytorch=1.11.0
- transformers=4.19.4
- sentence-transformers=2.1.0
- fastapi=0.*
- uvicorn=0.*
- pyyaml=5.*
- pytest=6.*
- pillow=8.*
- torchvision=0.*
- openai=0.*
- pydantic=1.*
- jinja2=3.0.*
- aiofiles=0.*
- huggingface_hub=0.*
- fastapi=0.77.1
- uvicorn=0.17.6
- pyyaml=6.0
- pytest=7.1.2
- pillow=8.4.0
- torchvision=0.12.0
- openai=0.20.0
- pydantic=1.9.1
- jinja2=3.1.2
- aiofiles=0.8.0
- huggingface_hub=0.8.1

View File

@@ -3,7 +3,7 @@ services:
server:
build:
context: .
dockerfile: config/Dockerfile
dockerfile: Dockerfile
args:
- PORT=8000
ports:
@@ -28,6 +28,9 @@ services:
# You can set these volumes to point to empty directories on host
- ./tests/data/embeddings/:/data/embeddings/
- ./tests/data/models/:/data/models/
deploy:
resources:
limits:
memory: 8g
# Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/
command: --host="0.0.0.0" --port=8000 -c=config/sample_config.yml -vv