2024-02-21 16:02:54 +00:00
### G4F - Docker Setup
2024-02-19 18:34:28 +00:00
2024-02-21 16:02:54 +00:00
Easily set up and run the G4F project using Docker without the hassle of manual dependency installation.
2024-02-19 18:34:28 +00:00
2024-02-21 16:02:54 +00:00
1. **Prerequisites:**
2024-02-19 18:34:28 +00:00
- [Install Docker ](https://docs.docker.com/get-docker/ )
- [Install Docker Compose ](https://docs.docker.com/compose/install/ )
2024-02-21 16:02:54 +00:00
2. **Clone the Repository:**
2024-02-19 18:34:28 +00:00
```bash
git clone https://github.com/xtekky/gpt4free.git
```
2024-02-21 16:02:54 +00:00
3. **Navigate to the Project Directory:**
2024-02-19 18:34:28 +00:00
```bash
cd gpt4free
```
2024-02-21 16:02:54 +00:00
4. **Build the Docker Image:**
2024-02-19 18:34:28 +00:00
```bash
docker pull selenium/node-chrome
docker-compose build
```
2024-02-21 16:02:54 +00:00
5. **Start the Service:**
2024-02-19 18:34:28 +00:00
```bash
docker-compose up
```
2024-02-21 16:02:54 +00:00
Your server will now be accessible at `http://localhost:1337` . Interact with the API or run tests as usual.
2024-02-19 18:34:28 +00:00
To stop the Docker containers, simply run:
```bash
docker-compose down
```
> [!Note]
2024-02-21 16:02:54 +00:00
> Changes made to local files reflect in the Docker container due to volume mapping in `docker-compose.yml`. However, if you add or remove dependencies, rebuild the Docker image using `docker-compose build`.
2024-02-19 18:34:28 +00:00
[Return to Home ](/ )