mirror of https://github.com/knrd1/chatgpt.git
docker instructions
This commit is contained in:
parent
b2ca70279f
commit
48d3cbca64
|
@ -10,8 +10,5 @@ ADD . /app
|
|||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Make port 80 available to the world outside this container
|
||||
EXPOSE 80
|
||||
|
||||
# Run the command to start your application
|
||||
CMD ["python", "./chatgpt.py"]
|
||||
CMD ["python", "-u", "./chatgpt.py"]
|
||||
|
|
24
README.md
24
README.md
|
@ -17,17 +17,6 @@ $ git clone https://github.com/knrd1/chatgpt.git
|
|||
$ cd chatgpt
|
||||
$ cp example-chat.conf chat.conf
|
||||
```
|
||||
To build the Docker image, you can use the following command:
|
||||
```docker build -t my-python-app .```
|
||||
|
||||
To run the Docker container, you can use the following command:
|
||||
```docker run -p 4000:80 my-python-app```
|
||||
|
||||
This Dockerfile ensures that your application runs in an isolated environment with its dependencies,
|
||||
which enhances its security and reliability. However, for a production environment, you might want
|
||||
to consider additional security measures, such as using a non-root user to run the application inside
|
||||
the container1.
|
||||
|
||||
### Configuration:
|
||||
|
||||
Edit chat.conf and change variables. Example configuration for IRCNet:
|
||||
|
@ -90,3 +79,16 @@ Create an image using endpoint /v1/images/generations:
|
|||
dalle
|
||||
```
|
||||
More details about models: https://platform.openai.com/docs/models
|
||||
|
||||
### Docker
|
||||
|
||||
To build the Docker image, you can use the following command:
|
||||
```docker build -t my-chatgpt-app .```
|
||||
|
||||
To run the Docker container, you can use the following command:
|
||||
```docker run -it my-chatgpt-app```
|
||||
|
||||
To detach from a running Docker, press Ctrl + P. While holding down Ctrl, press Q.
|
||||
|
||||
To reattach to the container later, you can use the following command:
|
||||
```docker attach container_id```
|
||||
|
|
Loading…
Reference in New Issue