Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile and docker-compose.yml for containerization #12

Merged
merged 5 commits into from
Sep 17, 2023

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Sep 5, 2023

Description

This PR adds a Dockerfile and a docker-compose.yml file to enable containerization of the Telegram chatbot application. The Dockerfile defines the steps to build a Docker image for the application, including installing dependencies and setting the default command. The docker-compose.yml file provides an easier way to orchestrate the Docker container.

Summary

  • Added Dockerfile to the root directory of the project.
  • Started from a Python base image and copied the application code into the Docker image.
  • Installed the dependencies listed in requirements.txt using pip.
  • Handled the environment variables by using a .env file.
  • Set the default command to run the application.
  • Optionally, created a docker-compose.yml file for easier orchestration of the container.

Please review and merge this PR to enable running the application in a Docker container.

Fixes #11.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/add-dockerfile

🎉 Latest improvements to Sweep:

  • Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
  • Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
  • We released a demo of our chunker, where you can find the corresponding blog and code.

💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Sep 5, 2023
@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Sep 7, 2023

ok how can i test out this container can you give me the command?

Hi @fislysandi,

I decided to make the following changes:

File Path Proposed Changes
README.md Modify README.md with contents:
• Add a new section titled "Running the Application in a Docker Container".
• In this section, provide the following instructions:
1. Build the Docker image using the command docker build -t telegram-chatbot .
2. Run the Docker container using the command docker run -p 80:80 telegram-chatbot
3. Alternatively, use Docker Compose to build and run the Docker container using the command docker-compose up

@fislysandi
Copy link

fails to build the container.

i solved it by apt installing python-hnswlib but i dont know how would that work with docker.

generally it fails to build hnswlib

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Sep 7, 2023

fails to build the container.

i solved it by apt installing python-hnswlib but i dont know how would that work with docker.

generally it fails to build hnswlib

Hi @fislysandi,

I decided to make the following changes:

File Path Proposed Changes
Dockerfile Modify Dockerfile with contents:
• Add a RUN command before the existing RUN command that installs the Python dependencies. This new RUN command should update the apt package lists and install the python-hnswlib package. The command should be: "RUN apt-get update && apt-get install -y python-hnswlib".

@HexyeDEV HexyeDEV merged commit 1aaf058 into main Sep 17, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Can You Please Put It into docker/podman Container?
2 participants