Skip to content

Commit

Permalink
use python
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhizzz committed Aug 4, 2024
1 parent 4c3401e commit 236b212
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ WORKDIR /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir flask requests openai opentelemetry-instrumentation-flask waitress
RUN pip install --no-cache-dir flask requests openai opentelemetry-instrumentation-flask

# Make port 80 available to the world outside this container
EXPOSE 8080

# Define environment variable
ENV NAME World

CMD [ "waitress-serve", "--call", "app:app"]
# Run main.py when the container launches
CMD [ "python3", "-m" , "flask", "run", "--port=8080"]
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ def get_models():
raise ValueError("MODEL_MAPPER and RESOURCE_MAPPER environment variables must be set")
if os.getenv('KEYS_MAPPER') is None:
raise ValueError("KEYS_MAPPER environment variable must be set")
app.run(host='0.0.0.0', port=8081, debug=True)
app.run(host='0.0.0.0', port=8080, debug=True)

0 comments on commit 236b212

Please sign in to comment.