diff --git a/Dockerfile b/Dockerfile index 79d280a..9fabcba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use the official Alpine Linux as the base image -FROM python:3.9-alpine +FROM python:3.11-alpine # Install Git RUN apk update && apk add --no-cache git @@ -10,11 +10,9 @@ WORKDIR /app # Copy the package files to the working directory COPY . . -# Install system dependencies -# RUN apk --no-cache add build-base libffi-dev - # Install Python dependencies -RUN pip install --no-cache-dir -r requirements.txt +RUN python -m pip install --upgrade pip +RUN pip install . # Set PYTHONPATH to the app directory ENV PYTHONPATH=/app @@ -23,4 +21,4 @@ ENV PYTHONPATH=/app EXPOSE 8000 # Command to run the FastAPI server -CMD ["python", "semantic_matcher/service.py"] \ No newline at end of file +CMD ["python", "semantic_matcher/service.py"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..ce3c9dd --- /dev/null +++ b/compose.yaml @@ -0,0 +1,9 @@ +services: + semantic_matching_service: + build: . + container_name: semantic_matching_service + restart: unless-stopped + ports: + - "8000:8000" + working_dir: /app/semantic_matcher + command: ["python", "service.py"]