From c0acdb9e94b2a94498e0262b6613dd8aa6ed0e52 Mon Sep 17 00:00:00 2001 From: Akil Date: Fri, 27 Jun 2025 21:56:50 +0300 Subject: [PATCH] Docker modified for deployment --- Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 51c5bd5..5d5e1d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,11 @@ FROM python:3.9-slim # Set environment variables ENV GROQ_API_KEY "add your GROQ API key here" +# ENV VIRTUAL_ENV=/opt/venv +# ENV PATH="$VIRTUAL_ENV/bin:$PATH" # Set work directory -WORKDIR ./ +WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -13,17 +15,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3-dev \ && rm -rf /var/lib/apt/lists/* +# Create and activate virtual environment +# RUN python -m venv $VIRTUAL_ENV + # Copy requirements file -COPY ./requirements.txt . +COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy project -COPY ./ /app +COPY . . # Expose the port the app runs on EXPOSE 8000 # Command to run the application -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file