1. init
This commit is contained in:
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
.idea/
|
||||
|
||||
#
|
||||
.venv
|
||||
|
||||
#
|
||||
.ipynb_checkpoints
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
# 使用官方 PyTorch CPU 基础镜像
|
||||
FROM pytorch/pytorch:latest
|
||||
|
||||
# 安装 Jupyter Lab 和常用库
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install jupyterlab matplotlib pandas seaborn
|
||||
|
||||
# 设置默认工作目录
|
||||
WORKDIR /workspace
|
||||
|
||||
# 暴露 Jupyter 端口
|
||||
EXPOSE 8888
|
||||
|
||||
# 默认启动 Jupyter Lab
|
||||
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
pytorch:
|
||||
build: .
|
||||
container_name: pytorch-lab
|
||||
ports:
|
||||
- "8888:8888"
|
||||
volumes:
|
||||
- .:/workspace
|
||||
command: jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root
|
||||
60
main.ipynb
Normal file
60
main.ipynb
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "initial_id",
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-06-10T05:50:03.583718Z",
|
||||
"start_time": "2025-06-10T05:50:01.582216Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'2.2.1'"
|
||||
]
|
||||
},
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import torch\n",
|
||||
"torch.__version__"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "03b94b64-ec24-4921-ab93-9bc7a93ca0ca",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.13"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
413
numpy.ipynb
Normal file
413
numpy.ipynb
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user