-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef0e087
commit c3c71bd
Showing
4 changed files
with
93 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Use the official Python image as base | ||
FROM python:3.8-slim | ||
|
||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install system dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libpq-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the dependencies file to the working directory | ||
COPY requirements.txt . | ||
|
||
# Install dependencies | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the rest of the application code to the working directory | ||
COPY . . | ||
|
||
# Expose the port Flask is running on | ||
EXPOSE 5000 | ||
|
||
# Command to run the application | ||
CMD ["sh", "-c", "python app.py $OPENAI_API_KEY"] |
Oops, something went wrong.