mirror: 初始快照

This commit is contained in:
Li_Feiyu committed 2026-10-02 22:54:53 +08:00
commit fae8c948cd
319 files changed
+5217599

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
# For more information, please refer to https://aka.ms/vscode-docker-python
#FROM python:3-slim
FROM python:3
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# Install necessary system dependencies
# RUN apt-get update && apt-get install -y \
# sudo \
# pkg-config \
# curl \
# liblzo2-2 liblzo2-dev \
# libmariadb-dev \
# build-essential \
# && rm -rf /var/lib/apt/lists/*
# WORKDIR /workspaces/tudien
# RUN ./bin/install_linux_packages.sh \
# && ./bin/install_wine32.sh \
# && ./bin/install_utilities.sh
# Install pip requirements
# COPY requirements.txt .
#RUN python -m pip install -r requirements.txt
# COPY pyproject.toml .
# Download the latest installer
# ADD https://astral.sh/uv/install.sh /uv-installer.sh
# Run the installer then remove it
# RUN sh /uv-installer.sh && rm /uv-installer.sh
# Ensure the installed binary is on the `PATH`
# ENV PATH="/root/.local/bin/:$PATH"
# RUN uv sync && source .venv/bin/activate
# RUN uv sync && . .venv/bin/activate
# WORKDIR /app
# COPY . /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
# RUN useradd -m -s /bin/bash vscode
USER appuser
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
# CMD ["python", "convert_all.py"]
# CMD ["ls", "-d", "/app"]
+35
View File
@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:2-3.12-bullseye",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/va-h/devcontainers-features/uv:1": {}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
"postCreateCommand": [
"./bin/install_linux_packages.sh",
"./bin/install_wine32.sh",
"./bin/install_utilities.sh",
"./bin/install_makedict.sh",
"pip install uv && uv sync",
"eval $(ssh-agent -s)",
"ssh-add <(echo '$SSH_PRIVATE_TUDIEN_CODESPACE')"
]
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
+71
View File
@@ -0,0 +1,71 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local on arm64/Apple Silicon.
"VARIANT": "3.13-bullseye", // Options
"NODE_VERSION": "none"
}
},
// Configure tool-specific properties.
"customizations": {
"codespaces": {
"repositories": {
"catusf/dictionary": {
"permissions": {
"issues": "write"
}
},
"catusf/stardict-vi": {
"permissions": {
"issues": "write"
}
}
}
},
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
"postCreateCommand": [
"./bin/install_linux_packages.sh",
"./bin/install_wine32.sh",
"./bin/install_utilities.sh",
"pip install uv && uv sync",
"eval $(ssh-agent -s)",
"ssh-add <(echo '$SSH_PRIVATE_TUDIEN_CODESPACE')"
],
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "appuser"
}