Commit
·
6566dd8
1
Parent(s):
211aa4f
Add Dockerfile for containerization of the AI application; include environment setup, dependencies, and FastAPI configuration. Create comprehensive documentation in readme.github.md detailing features, project structure, API endpoints, and development instructions. Replace existing README.md with a simplified version for Hugging Face Spaces deployment.
Browse files- dockerfile → Dockerfile +4 -4
- README.md +19 -0
- github.md → readme.github.md +0 -0
- readme.md +0 -12
dockerfile → Dockerfile
RENAMED
@@ -12,7 +12,7 @@ FROM python:3.11-slim
|
|
12 |
# Prevents Python from writing .pyc files (not needed in containers) and ensures logs are output directly.
|
13 |
|
14 |
# 3. Set the working directory in the container
|
15 |
-
WORKDIR /
|
16 |
|
17 |
# What is this?
|
18 |
# All subsequent commands will run in /app. Keeps the container organized.
|
@@ -44,19 +44,19 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
44 |
|
45 |
# 6. Copy the rest of the application code
|
46 |
COPY ./src ./src
|
47 |
-
COPY ./
|
48 |
|
49 |
# What is this?
|
50 |
# Copies your source code and readme into the container.
|
51 |
|
52 |
# 7. Expose the port FastAPI will run on
|
53 |
-
EXPOSE
|
54 |
|
55 |
# What is this?
|
56 |
# Documents that the container will listen on port 8080 (matches your uvicorn command).
|
57 |
|
58 |
# 8. Set the default command to run the FastAPI app
|
59 |
-
CMD ["fastapi", "run", "src/main.py", "--port", "
|
60 |
|
61 |
# What is this?
|
62 |
# This starts your FastAPI app using Uvicorn, making it accessible from outside the container.
|
|
|
12 |
# Prevents Python from writing .pyc files (not needed in containers) and ensures logs are output directly.
|
13 |
|
14 |
# 3. Set the working directory in the container
|
15 |
+
WORKDIR /src
|
16 |
|
17 |
# What is this?
|
18 |
# All subsequent commands will run in /app. Keeps the container organized.
|
|
|
44 |
|
45 |
# 6. Copy the rest of the application code
|
46 |
COPY ./src ./src
|
47 |
+
COPY ./README.md .
|
48 |
|
49 |
# What is this?
|
50 |
# Copies your source code and readme into the container.
|
51 |
|
52 |
# 7. Expose the port FastAPI will run on
|
53 |
+
EXPOSE 7860
|
54 |
|
55 |
# What is this?
|
56 |
# Documents that the container will listen on port 8080 (matches your uvicorn command).
|
57 |
|
58 |
# 8. Set the default command to run the FastAPI app
|
59 |
+
CMD ["fastapi", "run", "src/main.py", "--port", "7860"]
|
60 |
|
61 |
# What is this?
|
62 |
# This starts your FastAPI app using Uvicorn, making it accessible from outside the container.
|
README.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: AI Assistant
|
3 |
+
emoji: ⚡
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: docker
|
7 |
+
app_port: 7860
|
8 |
+
pinned: false
|
9 |
+
short_description: AI Assistant web app using Docker
|
10 |
+
tags:
|
11 |
+
- ai
|
12 |
+
- assistant
|
13 |
+
- docker
|
14 |
+
- huggingface-space
|
15 |
+
---
|
16 |
+
|
17 |
+
# AI Assistant
|
18 |
+
|
19 |
+
This is a web application for an AI assistant, built using Docker and deployed on Hugging Face Spaces.
|
github.md → readme.github.md
RENAMED
File without changes
|
readme.md
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: { { title } }
|
3 |
-
emoji: { { emoji } }
|
4 |
-
colorFrom: { { colorFrom } }
|
5 |
-
colorTo: { { colorTo } }
|
6 |
-
sdk: { { sdk } }
|
7 |
-
sdk_version: "{{sdkVersion}}"
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|