0% found this document useful (0 votes)
35 views1 page

Docker Core

Uploaded by

rameshdornala927
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Docker Core

Uploaded by

rameshdornala927
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

# Use the official Python slim image

FROM python:3.12-slim-bullseye

# Set working directory


WORKDIR /app

# Copy the current directory contents into the container


COPY . /app

# Install necessary packages


RUN apt-get update && apt-get install -y \
git \
gcc \
python3-dev \
libffi-dev \
musl-dev \
make \
&& rm -rf /var/lib/apt/lists/*

# Upgrade pip and install dependencies


RUN pip install --upgrade pip
RUN pip install -r [Link]
RUN pip install --upgrade langchain-google-genai

# Define build arguments for secrets


ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY
ARG GEMINI_API_KEY
ARG IP

# Set environment variables for the application using the build arguments
ENV AWS_ACCESS_KEY=$AWS_ACCESS_KEY
ENV AWS_SECRET_KEY=$AWS_SECRET_KEY
ENV GEMINI_API_KEY=$GEMINI_API_KEY
ENV IP=$IP

# Expose the necessary port


EXPOSE 80

# Start the application


CMD ["uvicorn", "main:app", "--host", "[Link]", "--port", "80"]

You might also like