Commit
·
95df002
1
Parent(s):
dee6b25
git ignore a root priv
Browse files- .dockerignore +63 -0
- Dockerfile +5 -5
.dockerignore
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / cache files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*.so
|
5 |
+
*.pyd
|
6 |
+
|
7 |
+
# Jupyter notebooks (optional)
|
8 |
+
*.ipynb
|
9 |
+
|
10 |
+
# Virtual environments
|
11 |
+
.env
|
12 |
+
.venv/
|
13 |
+
env/
|
14 |
+
venv/
|
15 |
+
|
16 |
+
# Python packaging
|
17 |
+
*.egg-info/
|
18 |
+
*.egg
|
19 |
+
dist/
|
20 |
+
build/
|
21 |
+
pip-wheel-metadata/
|
22 |
+
|
23 |
+
# Installer logs
|
24 |
+
pip-log.txt
|
25 |
+
pip-delete-this-directory.txt
|
26 |
+
|
27 |
+
# System files
|
28 |
+
.DS_Store
|
29 |
+
Thumbs.db
|
30 |
+
|
31 |
+
# Git & version control
|
32 |
+
.git/
|
33 |
+
.gitignore
|
34 |
+
.gitattributes
|
35 |
+
|
36 |
+
# Docker files (optional if not needed in container)
|
37 |
+
Dockerfile
|
38 |
+
docker-compose.yml
|
39 |
+
|
40 |
+
# IDE/editor files
|
41 |
+
.vscode/
|
42 |
+
.idea/
|
43 |
+
*.swp
|
44 |
+
*.swo
|
45 |
+
|
46 |
+
# Cache
|
47 |
+
*.log
|
48 |
+
.cache/
|
49 |
+
*.bak
|
50 |
+
|
51 |
+
# Data & models (unless you want them in container)
|
52 |
+
*.pt
|
53 |
+
*.pth
|
54 |
+
*.ckpt
|
55 |
+
*.h5
|
56 |
+
*.npz
|
57 |
+
*.npy
|
58 |
+
data/
|
59 |
+
checkpoints/
|
60 |
+
models/
|
61 |
+
|
62 |
+
# Gradio-specific (if you have logs or temp files)
|
63 |
+
gradio_cached_examples/
|
Dockerfile
CHANGED
@@ -14,8 +14,8 @@ RUN apt-get update && \
|
|
14 |
COPY . .
|
15 |
|
16 |
# Install Python dependencies
|
17 |
-
RUN pip install --upgrade pip
|
18 |
-
|
19 |
|
20 |
# Make script executable and move it to PATH
|
21 |
RUN install -m 755 sft.py /usr/local/bin/sft
|
@@ -24,12 +24,12 @@ RUN install -m 755 sft.py /usr/local/bin/sft
|
|
24 |
RUN useradd --create-home appuser
|
25 |
RUN chown -R appuser:appuser /usr/src/app
|
26 |
|
27 |
-
# Use non-root user
|
28 |
-
USER appuser
|
29 |
-
|
30 |
# Set environment variables
|
31 |
ENV XDG_CACHE_HOME=/usr/src/app/cache
|
32 |
|
|
|
|
|
|
|
33 |
# Expose the Gradio port
|
34 |
EXPOSE 7860
|
35 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
|
|
14 |
COPY . .
|
15 |
|
16 |
# Install Python dependencies
|
17 |
+
RUN pip install --upgrade pip && \
|
18 |
+
pip install --no-cache-dir -r requirements.txt
|
19 |
|
20 |
# Make script executable and move it to PATH
|
21 |
RUN install -m 755 sft.py /usr/local/bin/sft
|
|
|
24 |
RUN useradd --create-home appuser
|
25 |
RUN chown -R appuser:appuser /usr/src/app
|
26 |
|
|
|
|
|
|
|
27 |
# Set environment variables
|
28 |
ENV XDG_CACHE_HOME=/usr/src/app/cache
|
29 |
|
30 |
+
# Use non-root user
|
31 |
+
USER appuser
|
32 |
+
|
33 |
# Expose the Gradio port
|
34 |
EXPOSE 7860
|
35 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|