Create Dockerfile
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11
|
| 2 |
+
|
| 3 |
+
# Update the package lists and install git
|
| 4 |
+
RUN apt update && apt install -y git
|
| 5 |
+
|
| 6 |
+
# Clone the hf-llm-api repository into the /app directory
|
| 7 |
+
RUN git clone https://github.com/Niansuh/hf-llm-api.git /app
|
| 8 |
+
|
| 9 |
+
# Set the working directory to /app
|
| 10 |
+
WORKDIR "/app"
|
| 11 |
+
|
| 12 |
+
# Install Python dependencies from requirements.txt
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
+
|
| 15 |
+
# Expose port 23333 for the application
|
| 16 |
+
EXPOSE 23333
|
| 17 |
+
|
| 18 |
+
# Command to run the application when the container starts
|
| 19 |
+
CMD ["python", "-m", "apis.chat_api"]
|