-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c277667
commit 83a463e
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203, W503 | ||
exclude = .git,__pycache__,build,dist,.venv | ||
per-file-ignores = | ||
# Ignore imported but unused in __init__.py files | ||
__init__.py: F401 | ||
max-complexity = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Use slim base image | ||
FROM python:3.9-slim | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Install only required system dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy only necessary files | ||
COPY requirements.txt . | ||
|
||
# Install minimal dependencies | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Expose port | ||
EXPOSE 8000 | ||
|
||
# Run app | ||
CMD ["uvicorn", "automl.app:app", "--host", "0.0.0.0", "--port", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.9' | ||
|
||
services: | ||
api: | ||
build: . | ||
image: yourusername/automl-api:latest | ||
ports: | ||
- "8000:8000" | ||
environment: | ||
- JWT_SECRET_KEY=${JWT_SECRET_KEY} | ||
- VALID_API_KEY=${VALID_API_KEY} | ||
- REDIS_URL=redis://redis:6379/0 | ||
depends_on: | ||
- redis | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 3 | ||
|
||
redis: | ||
image: redis:alpine | ||
ports: | ||
- "6379:6379" | ||
volumes: | ||
- redis_data:/data | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "ping"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 3 | ||
|
||
volumes: | ||
redis_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
torch==2.4.1 | ||
pytorch-lightning==2.4.0 | ||
transformers==4.45.2 | ||
numpy==1.24.4 | ||
pandas==2.0.3 | ||
matplotlib==3.7.1 | ||
fastapi==0.109.1 | ||
uvicorn==0.15.0 | ||
requests==2.31.0 | ||
setuptools>=70.0.0 | ||
scikit-learn==1.3.0 | ||
seaborn==0.11.2 | ||
pydantic==1.10.18 | ||
python-jose==3.3.0 | ||
python-dotenv==1.0.0 | ||
pytest==7.4.3 | ||
rich==13.9.0 | ||
click==8.1.7 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.